js基础:限量版广告 1个IP一天只弹一次的AD代码
岁数大了,QQ也不闪了,微信也不响了,电话也不来了,但是图老师依旧坚持为大家推荐最精彩的内容,下面为大家精心准备的js基础:限量版广告 1个IP一天只弹一次的AD代码,希望大家看完后能赶快学习起来。
functionsetCookie(name,value,expire){
window.document.cookie=name+"="+escape(value)+((expire==null)?"":(";expires="+expire.toGMTString()));
}
functiongetCookie(Name){
varsearch=Name+"=";
if(window.document.cookie.length0){//ifthereareanycookies
offset=window.document.cookie.indexOf(search);
if(offset!=-1){//ifcookieexists
offset+=search.length; //setindexofbeginningofvalue
end=window.document.cookie.indexOf(";",offset) //setindexofendofcookievalue
if(end==-1)
end=window.document.cookie.length;
returnunescape(window.document.cookie.substring(offset,end));
}
}
returnnull;
}
functionregister(name){
vartoday=newDate();
varexpires=newDate();
expires.setTime(today.getTime()+1000*60*60*24);
setCookie("ItDoor",name,expires);
}
varexitURL=http://homepage.yesky.com/;
functionopenWin(){
varc=getCookie("ItDoor");
if(c!=null){
return;
}
$False$
register("xiaolin");
varfeatureStr="''";
featureStr="'top=0,left=0,width=800,height=600,toolbar=yes,menubar=no,scrollbars=no,resizable=no,location=no,status=no,center:no'";
self.focus();
varExitWindow=window.open(exitURL,'',featureStr);
ExitWindow.focus();
}
openWin();
window.focus()