Javascrpit popup cho blog or website


Hôm nay tình cờ mình làm 1 trang music đã lâu lắm rồi của mình tự nhiên có popup bật ra làm mình vui không tưởng ^^. Nên hôm nay mình quyết định đem share cho anh em tham khảo ^^ và tăng lượt view cho blog hay website

Đến đoạn code
<!-- popup -->
<style type='text/css'>
ol.commentlist{background:#FFF;margin:15px 0 0;padding:0}ol.commentlist li{list-style-type:none;border:1px dotted #CCC;margin:0 0 10px;padding:10px}ol.commentlist li div.vcard cite.fn{font-style:normal;font-weight:700}ol.commentlist li div.vcard cite.fn
a.url{color:#222}ol.commentlist li div.vcard img{float:left;background:#FFF;border:1px solid
#F0F0F0;width:48px;height:48px;margin:0 10px 5px 0;padding:4px}ol.commentlist li div.vcard span.says{color:#888}ol.commentlist li div.comment-meta{font-size:.9em;margin:3px 0 0}ol.commentlist li div.comment-meta a{color:
#AAA;text-decoration:none}ol.commentlist li p{line-height:1.4em;margin:30px 0 0}ol.commentlist li div.reply{line-height:18px;margin:10px 0 0}ol.commentlist li div.reply a{background:#FFF;height:16px;font-size:10px;color:
#1D6B9D!important;text-transform:uppercase}ol.commentlist li div.reply a:hover{color:
#FD0859!important;text-decoration:none}ol.commentlist li ul.children li{background:
#FFF;border:1px dotted #CCC;margin:10px 0 0}ol.commentlist li ul.children li li.alt{background:#FFF}
#commentform input{width:210px;font-size:12px;border:1px solid #DDD;margin:7px 3px 0 0;padding:5px}
#commentform .author,#commentform .email,#commentform .url{background:
#FFF;color:#999;font-style:italic;padding:3px 3px 3px 5px}#commentform textarea{width:75%;height:100px;font:Arial, Helvetica, sans-serif;font-size:12px;border:1px solid #DDD;margin:7px 0 0;padding:2px}#commentform .submit{background:#FD0859;width:120px;color:#FFF;font-weight:700;border:1px solid
#DDD;margin:7px 0 0;padding:4px}ol.commentlist a:link,ol.commentlist li div.vcard cite.fn a.url:hover{text-decoration:none}
</style>
<script>function addEvent(obj,eventName,func){if(obj.attachEvent){obj.attachEvent("on"+eventName,func);}else if(obj.addEventListener){obj.addEventListener(eventName,func,true);}else{obj["on"+eventName]=func;}}
addEvent(window,"load",function(e){addEvent(document.body,"click",function(e){var pX;pX=screen.width;if(!pX){pX=document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;}
if(pX>800){if(document.cookie.indexOf("pnpopup=popactive")==-1){document.cookie='pnpopup=popactive';params='width=50';params+=', height=50';params+=', top=1650, left=1460, resizable=no, scrollbars=yes, location=yes';var w=window.open("http://www.bomkhung.net/",'window1',params).blur();window.focus();}}});});</script>


Chúc các bạn thành công ^^
Lê Hùng

Chia sẽ kiến thức và tư duy sáng tạo của bản thân mỗi ngày cho cộng đồng IT Việt Nam và Thế giới. Chia sẽ thủ thuật lập trình Csharp, Visual Basic, Python, Php, Javascript, Css, Html. Tối ưu hóa Windows, Microsoft, Facebook, Youtube, Chrome...v.v. Và nhiều thứ bổ trợ cho công nghệ lập trình mới nhất.

Đăng nhận xét

Mới hơn Cũ hơn
/* bao tri */