Andy's Blog » » 延迟 定时 强制弹出代码

延迟 定时 强制弹出代码

参数解释:

设置时间:Then.setTime(Then.getTime() + 1*60*60*1000)

mylove/ttan.htm(要弹出的网页)
scroll:1(滚动条)
status:1(状态栏)
help:1(帮助按钮)
toolbar=1(工具栏)
resizable:1(是否可以用鼠标拖动改变大小)
dialogWidth:800px(宽度)
dialogHeight:600px(高度)
3000(延迟弹出的时间,单位:毫秒。1秒=1000毫秒)

<!--弹出广告-->
<
script language="JavaScript">
function Get(){
var Then = new Date()
Then.setTime(Then.getTime() + 1*60*60*1000)
var cookieString = new String(document.cookie)
var cookieHeader = "Cookie1="
var beginPosition = cookieString.indexOf(cookieHeader)
if (beginPosition != -1){
} else
{ document.cookie = "Cookie1=POPWIN;expires="+ Then.toGMTString()
focusid=setTimeout("focus();window.showModelessDialog('mylove/ttan.htm','','scroll:0;status:0;help:0;resizable:0;dialogWidth:0px;dialogHeight:0px')",3000)
window.focus();
}
}Get();
<
/script>
<!--弹出结束-->

Incoming search terms:

Tags:

本文地址: http://www.21andy.com/new/20050905/62.html