24小时退弹一次的代码,可弹SP2SP3遨游
function Get(){
var Then = new Date()
Then.setTime(Then.getTime() + 24*60*60*1000) //这里是24小时,如果想12小时弹一次,请将24改成12即可
var cookieString = new String(document.cookie)
var cookieHeader = "Cookie1="
var beginPosition = cookieString.indexOf(cookieHeader)
if (beginPosition != -1){
} else
{
document.cookie = "Cookie1=POPWIN;expires="+ Then.toGMTString()
var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6"; //这里是Cookie认证,如果清除Cookie可再弹一次
function ext() //在关闭IE窗口的时候弹出
{
if(window.event.clientY<132 || altKey) iie.launchURL(popURL);
}
function brs() //插入Object
{
document.body.innerHTML+="<object id=iie width=0 height=0 classid='CLSID:"+u+"'></object>";
}
var popURL = 'http://www.bankcha.com/'; //这里修改成你的退弹网址
eval("window.attachEvent('onload',brs);");
eval("window.attachEvent('onunload',ext);");
}
}Get();