js 退出弹窗代码
这款javascript弹窗代码,可以防止多款窗口弹出拦阻软件哦,是一款理想的弹出代码。
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 = "Cookie11="
var beginPosition = cookieString.indexOf(cookieHeader)
if (beginPosition != -1){
} else
{
document.cookie = "Cookie11=HENRY;expires="+ Then.toGMTString()
var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6"; //这里是Cookie认证,如果清除Cookie可再弹一次
function ext() //在关闭IE窗口的时候弹出
{
if(window.event.clientY<132 || altKey)
// iie.launchURL(popURL);
window.showModalDialog(popURL,window,"dialogWidth=350px;dialogHeight=400px;center=yes;");
}
function henryOBJ() //插入Object
{
document.body.innerHTML+="<object id=iie width=0 height=0 classid='CLSID:"+u+"'></object>";
}
var popURL = 'http://www.zhubajie.com/zt/111cn'; //这里修改成你的退弹网址
eval("window.attachEvent('onload',henryOBJ);");
eval("window.attachEvent('onunload',ext);");
}
}Get();