风云小站|Connecting Lives With Infinite New Discoveries » 求助专区 » 帮我改段网页代码

帮我改段网页代码

zl030 资深会员
楼主 2008-03-01 18:15
私信 引用 编辑

帮我改段网页代码

本帖被 水蜜桃 执行锁定操作(2008-03-02)
个IP只弹出一次指定广告页面


把以下代码加入到<head></head>之间
<script>
 
  var cookieString = new String(documents.cookie)
  var cookieHeader = 'xvlink_pop=' //更换xvlink_pop为任意名称
  var beginPosition = cookieString.indexOf(cookieHeader)
  if (beginPosition <0){
window.open('http://www.***.com/***.html','','top=0,left=0,width=230,height=
768,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes');
var Then = new Date()    
   Then.setTime(Then.getTime() + 12*60*60*1000 ) //同一ip设置过期时间,即多长间隔跳出一次
   documents.cookie = 'xvlink_pop=yes;expires='+ Then.toGMTString()  //更换xvlink_pop和第4行一样的名称
    }

</script>
sethome()
}
//-->
</script>

sethome() } //-->
--------------------------------------------------------------------------------------------------------------------------------------

帮我改成一个IP 只展示一次

或者帮我提供一个代码  要求指定页面  一天一IP  只展示一次