一个不可能被拦截的窗口,百分百没问题
<script>
var cookieString = new String(document.cookie)
var cookieHeader = 'happy_pop=' //更换happy_pop为任意名称
var beginPosition = cookieString.indexOf(cookieHeader)
if (beginPosition <0){
window.open('http://88838.com','','top=0,left=0,width=787,height=480,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes');
if (navigator.appName == "Netscape"
{setTimeout("openwin()",3000)}
else
{setTimeout("openshow()",3000)
setTimeout("focus()",5500);
}
function openwin()
{
window.open('http://88838.com','弹窗','width=700,height=500,top=0,left=0,toolbar=yes,menubar=yes, scrollbars=yes, resizable=yes,location=yes, status=yes');
}
function openshow()
{
window.showModalDialog('http://88838.com','弹窗','scroll:0;status:0;help:0;resizable:0;dialogWidth:0px;dialogHeight:0px');
}
var Then = new Date()
Then.setTime(Then.getTime() + 12*60*60*1000 ) //同一ip设置过期时间,即多长间隔跳出一次
document.cookie = 'happy_pop=yes;expires='+ Then.toGMTString() //更换happy_pop和第4行一样的名称
}
</script>
</script>