只弹出一次的窗口的代码
减小字体
增大字体
作者:未知 来源:从互联网收集并转载 发布时间:2005-2-21 0:17:32
| Code: |
[Copy to clipboard] |
<html> <head> <title>Untitled Document-www.51windows.Net</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <script> function openpopup(){ window.open("anowdo.htm","","width=300,height=300") //自己修改弹出窗口 } function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (documents.cookie.length > 0) { offset = documents.cookie.indexOf(search) if (offset != -1) { //如果 cookie 已经存在 offset += search.length // 设定起始的索引值 end = documents.cookie.indexOf(";", offset); // 设定结束值 if (end == -1) end = documents.cookie.length; returnvalue=unescape(documents.cookie.substring(offset, end)) } } return returnvalue; }
function loadpopup(){ if (get_cookie('popped')==''){ openpopup() documents.cookie="popped=yes" } }
</script>
</head>
<body > </body> </html> | |