我想它象弹窗一样,每IP每天访问我网站只执行一次
<iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.xxxx.com/>高手帮忙,小弟先谢了

解决方案 »

  1.   

    这是24小时弹窗代码<script language='javascript'>
    if (document.cookie.indexOf("mypopuped")==-1) {  //检测cookie
            var expdate = new Date((new Date()).getTime() + (24 * 60 * 60 * 1000));  //24小时的
            window.open('http://bbs.xxx.com','','width=200,height=100').blur();  // 弹窗代码
            document.cookie="mypopuped=1;expires=" + expdate.toGMTString() + ";path=/;";  // 写cookie
            self.focus(); //设置当前窗口
    }
    </script>我把<iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.xxxx.com/>这样加入,但不能实行
    <script language='javascript'>
    if (document.cookie.indexOf("mypopuped")==-1) {  //检测cookie
            var expdate = new Date((new Date()).getTime() + (24 * 60 * 60 * 1000));  //24小时的
           <iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.xxxx.com/>.blur();  // 弹窗代码
            document.cookie="mypopuped=1;expires=" + expdate.toGMTString() + ";path=/;";  // 写cookie
            self.focus(); //设置当前窗口
    }
    </script>
      

  2.   

    请问怎么让<iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.xxxx.com/>24小时执行一次不知道有没讲明白意思,高手帮忙
      

  3.   

    <script language='javascript'>
    if (document.cookie.indexOf("mypopuped")==-1) {  //检测cookie
            var expdate = new Date((new Date()).getTime() + (24 * 60 * 60 * 1000));  //24小时的
             document.getElementById("iframe1").src="http://bbs.xxxx.com";
            document.cookie="mypopuped=1;expires=" + expdate.toGMTString() + ";path=/;";  // 写cookie
            self.focus(); //设置当前窗口
    }
    </script><iframe id=iframe1 frameborder=0 width=0 height=0 scrolling=no/>
      

  4.   

    楼上的大哥,我一次要执行很多的地址比如:
    <iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.xxxx.com/>
    <iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.yyyy.com/>
    <iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.zzzz.com/>
    <iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.aaaa.com/>
    请问要加在哪里
      

  5.   

    <script language='javascript' defer>
    if (document.cookie.indexOf("mypopuped")!=-1) {  //检测cookie  也就是当天访问过
                   var allFrame = document.getElementsByName("iframe");//当然这就是把该页的所有iframe全部设置了
                   for(var i=0;i<allFrame.length;i++)
                   {
                        allFrame[i].src="";  //路径设为空
                   }
    }
    else{
    var expdate = new Date((new Date()).getTime() + (24 * 60 * 60 * 1000));  //24小时的
            document.cookie="mypopuped=1;expires=" + expdate.toGMTString() + ";path=/;";  // 写cookie
            self.focus(); //设置当前窗口
    }
    </script>加在<title>下面就行了
      

  6.   

    Good_Net() 大哥你好!你的意思是,把你下面的这段代码加在<title>下面,然后在我需要的页面直接加:
    <iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.xxxx.com/>
    <iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.yyyy.com/>
    <iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.zzzz.com/>
    <iframe frameborder=0 width=0 height=0 scrolling=no src=http://bbs.aaaa.com/>
    这个代码吗?
      

  7.   

    不是放广告了,我是想把论坛的帖子浏览量做上去,但不设置24小时的话~~CPU一只暂用%100,我使用的是PHP论坛程序,没办法
      

  8.   

    想用javascript做好象不行,没有用户会开机24小时的
      

  9.   

    其实在后台取时间来判断是最准确的,因为js取的是前台的时间,是可以随意修改的.在前台页面加入判断语句来看是否假如iframe就可以了.或者就是不太准确的来用前台的cookie了.其实,让每次都访问先你的网址不是很好吗?访问量提高的更快