|
源代码网推荐
<HTML> 源代码网推荐<HEAD> 源代码网推荐<META http-equiv="Content-Type" content="text/html; charset=gb2312"> 源代码网推荐<TITLE>自由设定弹出窗口时间并且一天只弹一次</TITLE> 源代码网推荐</HEAD> 源代码网推荐<BODY OnLoad="doPopup();">
等3秒... 源代码网推荐<SCRIPT LANGUAGE="JavaScript"> 源代码网推荐<!-- Begin 源代码网推荐closetime = 0; // Close window after __ number of seconds? 源代码网推荐// 0 = do not close, anything else = number of seconds
function Start(URL, WIDTH, HEIGHT) { 源代码网推荐windowprops = "menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,left=200,top=50,width=" + WIDTH + ",height=" + HEIGHT; 源代码网推荐preview = window.open(URL, "preview",windowprops); 源代码网推荐if (closetime) setTimeout("preview.close();", closetime*1000); 源代码网推荐}
function get_cookie(Name) { 源代码网推荐 var search = Name + "=" 源代码网推荐 var returnvalue = ""; 源代码网推荐 if (document.cookie.length > 0) { 源代码网推荐 offset = document.cookie.indexOf(search) 源代码网推荐 if (offset != -1) { // if cookie exists 源代码网推荐 offset += search.length 源代码网推荐 // set index of beginning of value 源代码网推荐 end = document.cookie.indexOf(";", offset); 源代码网推荐 // set index of end of cookie value 源代码网推荐 if (end == -1) 源代码网推荐 end = document.cookie.length; 源代码网推荐 returnvalue=unescape(document.cookie.substring(offset, end)) 源代码网推荐 } 源代码网推荐 } 源代码网推荐 return returnvalue; 源代码网推荐} 源代码网推荐function doPopup() {
url = http://www.jz123.cn; // change to your popup page URL
width = 600; // width of window in pixels 源代码网推荐height = 500; // height of window in pixels 源代码网推荐delay = 3; // time in seconds before popup opens 源代码网推荐if (get_cookie("popped")==""){ 源代码网推荐timer = setTimeout("Start(url, width, height)", delay*1000); 源代码网推荐document.cookie="popped=yes" 源代码网推荐} 源代码网推荐} 源代码网推荐// End --> 源代码网推荐</script>
</BODY></HTML> 源代码网推荐
源代码网供稿. |