代码是偶的好友写的。使用了 觉得不错
功能:5小时弹一次 背后弹出 自动适应不同分辩率 准全屏显示
代码:
<script>
function openwin(){
window.open(http://www.6882.com,"pop1","width=" (window.screen.width-15) ",height=" (window.screen.height-170) ",left=0,top=0,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes")
setTimeout("focus();",5);
}
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 Set()
{
var Then = new Date()
Then.setTime(Then.getTime() 5*60*60*1000 )
document.cookie = "popped1=yes;expires=" Then.toGMTString()
}
function loadpopup(){
if (get_cookie('popped1')=='')
{
openwin()
Set()
}
}
setTimeout("loadpopup()",5);
</script>
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



