当前位置: 移动技术网 > IT编程>开发语言>JavaScript > 弹出广告特效代码(一个IP只弹出一次)

弹出广告特效代码(一个IP只弹出一次)

2019年07月19日  | 移动技术网IT编程  | 我要评论
<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>

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网