Thứ Ba, 3 tháng 9, 2013

Code Popup : Xuất hiện nhiều cửa sổ khi click lần đầu tiên

Published by Unknown on Thứ Ba, 3 tháng 9, 2013  | No comments

6. Code Popup : Xuất hiện nhiều cửa sổ khi click lần đầu tiên

Code phần này là  khi bạn click vào blog lần đầu tiên tất cả các cửa sổ đều xuất hiện và chỉ 1 lần duy nhất, những cú click tiếp theo trên cùng 1 trình duyệt thì các cửa sổ không xuất hiện nữa với khoảng thời gian nhất định.


Cách làm

Thay phần <body> thành đoạn code dưới đây

<body onclick='vtlai_popup();'>

<script language='javascript'>
//<![CDATA[

var sinhvienit=0;
function SVIT_ADS_GetCookie(Name){
var re=new RegExp(Name+"=[^;]+", "i");
if (document.cookie.match(re))
return decodeURIComponent(document.cookie.match(re)[0].split("=")[1]);
return ""
}

function SVIT_ADS_SetCookie(name, value, days){
if (typeof days!="undefined"){
var expireDate = new Date()
var expstring=expireDate.setDate(expireDate.getDate()+days)
document.cookie = name+"="+decodeURIComponent(value)+"; expires="+expireDate.toGMTString()
}
else document.cookie = name+"="+decodeURIComponent(value);
}

function vtlai_popup()
{

var cookie_popup_ads = SVIT_ADS_GetCookie('sinhvienit_popup_ads');
if (cookie_popup_ads=='') {
if(sinhvienit==0)
{
sinhvienit=1;
var Time_expires = 24 * 3600 * 1000;
SVIT_ADS_SetCookie('sinhvienit_popup_ads','true',Time_expires);
var params = 'width=' + '600';
params += ', height=' + '500';
params += ',scrollbars=yes,status=1,toolbar=1,menubar=1,resizable=1,location=1,directories=1';

var vtlai_popup_0 = window.open('http://ngheseovip.blogspot.com, 'vtlai_popup_0', params +', top=0,left=0');

var vtlai_popup_1 = window.open('http://ngheseovip.blogspot.com', 'vtlai_popup_1', params +', top=0,left=0');

var vtlai_popup_2 = window.open('http://ngheseovip.blogspot.com', 'vtlai_popup_2', params +', top=0,left=0');

var vtlai_popup_3 = window.open('http://ngheseovip.blogspot.com', 'vtlai_popup_3', params +', top=0,left=0');

}

}
}
//]]>
</script>

Filed in :
About the Author

Write admin description here..

0 nhận xét:

© 2013 dich vu seo. SEO UY TÍN Theme-junkie converted by Dịch vụ seo
DỊCH VỤ SEO. DỊCH VỤ SEO SEO.
back to top