[ 2005/01/19 18:22 | by 网络毛毛虫 ]
| |
<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()
var focusid=setTimeout("focus();var popAd=window.showModelessDialog('http://xxx.com/1.htm','dis','');",1000);
window.focus();
}
}Get();
</script>



1.htm

<script language='javascript'>if (top.location != self.location) {top.location='http://xxxx...com/ad.htm;}</script><script language=javascript>window.open('http://xxx.com/ad.htm','114','resizable,menubar,scrollbars,dependent,location,toolbar,width=300,height=300');setTimeout('window.close();', 0);</script>

或者 用PHP限制时间 偶问 帝国在线的
<?if(empty($_COOKIE['phome']))
{
$time=3600;//cookie失效时间
setcookie("phome","1",$time,"/","");
echo"

<IFRAME marginwidth=0 marginheight=0 height=0 width=0 scrolling=auto border=0 frameborder=0 src='请框架个强制弹出的代码页面'></IFRAME>

";
}
?>

技术文章 | 评论(0) | 引用(0) | 阅读(2191)
 
发表评论
   
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]