关闭

24小时只弹一次

标签: featuresfunctionjavascripturlstringdate
499人阅读 评论(0) 收藏 举报
分类:
function Get(){
var Then = new Date()
Then.setTime(Then.getTime() + 24*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()
var focusid=setTimeout("focus();var popAd=window.showModelessDialog(http://www.youname.com/tanchu.htm','dis','');",1000);
window.focus();
}
}Get();

http://www.youname.com/tanchu.htm为
<script language="JavaScript">
<!--
function openWindow2(URL,Name,features) { //v2.0
window.open(URL,Name,features);
}
openWindow2('http://www.hacker.cn','pop','resizable,scrollbars,location, top=0');
//-->
setTimeout('window.close();', 0);
</script>
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:397727次
    • 积分:5721
    • 等级:
    • 排名:第4510名
    • 原创:143篇
    • 转载:195篇
    • 译文:0篇
    • 评论:47条