弹出广告特效代码(一个IP只弹出一次)
时间:2021-04-03 07:46:15|栏目:|点击: 次
<script>
var cookieString = new String(document.cookie)
var cookieHeader = 'happy_pop=' //更换happy_pop为任意名称
var beginPosition = cookieString.indexOf(cookieHeader)
if (beginPosition <0){
window.open('2.html','','top=0,left=0,width=787,height=480,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes');
var Then = new Date()
Then.setTime(Then.getTime() + 60*1000 ) //同一ip设置过期时间,即多长间隔跳出一次
document.cookie = 'happy_pop=yes;expires='+ Then.toGMTString() //更换happy_pop和第4行一样的名称
}
</script>
var cookieString = new String(document.cookie)
var cookieHeader = 'happy_pop=' //更换happy_pop为任意名称
var beginPosition = cookieString.indexOf(cookieHeader)
if (beginPosition <0){
window.open('2.html','','top=0,left=0,width=787,height=480,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes');
var Then = new Date()
Then.setTime(Then.getTime() + 60*1000 ) //同一ip设置过期时间,即多长间隔跳出一次
document.cookie = 'happy_pop=yes;expires='+ Then.toGMTString() //更换happy_pop和第4行一样的名称
}
</script>
上一篇:献给迷茫中的初学者如何去学习编程
栏 目:
下一篇:Powershell小技巧之通过EventLog查看近期电脑开机和关机时间
本文标题:弹出广告特效代码(一个IP只弹出一次)
本文地址:http://www.codeinn.net/misctech/93499.html






