JS每个用户进入网站只显示一次的弹窗

2019-3-23 20:50:00  人气 276    程序下载&共享  
<html>
<head>
<title>只弹出一次提示的弹出窗口</title>
<script language='javascript1.2'>
var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var bouncelimit=32 //(must be divisible by 8)
var curtop
var direction='up'
var boxheight=''
function initbox(){
if (!dom&&!ie&&!ns4)
return
crossobj=(dom)?document.getElementById('*in').style : ie? document.all.*in : document.*in
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
crossobj.top=scroll_top-250
crossobj.visibility=(dom||ie)? 'visible' : 'show'
*start=setInterval('*in()',50)
}

function *in(){
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<100+scroll_top)
crossobj.top=parseInt(crossobj.top)+40
else{
clearInterval(*start)
bouncestart=setInterval('bouncein()',50)
}
}

function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility='hidden'
}


function get_cookie(Name) {
var search = Name + '='
var returnvalue = ''
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(';', offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function *ornot(){
if (get_cookie('*pedin')==''){
window.onload=initbox
document.cookie='*pedin=yes'
}
}
*ornot()
</script>

</head>
<body>
<div id='*in' style='position:absolute;visibility:hidden;left:250;top:100;width:500;height:300;background-color:#F5F5F5'>
<div align='right'><a href='javascript :dismissbox()'>[关闭窗口] </a></div>
这是只显示一次,再次刷新就不显示了!
</div>
</body>
</html>

. wap站长网-提供wap精品源码、1159.com.cn联系QQ:290016689

发表回复

   


  通知楼主
暂无回复!
耀磊科技镇江8核32G,1
镇江自营机房独立服务器配置
镇江便宜的百兆带宽服务器
镇江服务器就是性价比高
推荐!镇江服务器可升级到百
国内独立服务器一年多少钱?
信息2手,你不知道的网站!
香港多c段站群服务器特价优
返回程序下载&共享
2009-2018 版权所有 1159.com.cn pc