想用javascript控制页面的自动跳转,就是说当本页面加载完毕(包括图片)后,自动跳转到另外一个页面,当另一个页面加载完毕后,又自动跳转到其他页面……
实际上,就是想找到一个页面加载完成的事件,onload事件好像不能满足连续的跳转,也可能是我的用法不正确,总之,向大家请教!先谢谢各位了!!!!感激不尽!

解决方案 »

  1.   

    每个页面都加入:
    document.addEventListener('load', 'window.location.href="URL you want to redirect to";', false); // FF

    document.attachEvent('onload', 'window.location.href="URL you want to redirect to";'); // IE
      

  2.   

    < HEAD> 
    <meta http-equiv="Refresh" content="10;url=http://www.xxx.net">
    < /HEAD> 在head中写吧,10替换为自己需要的秒,地址替换为要跳的页
    这个例子是说打开十秒后跳到http://www.xxx.net
      

  3.   

    <script>
    document.onreadystatechange = subSomething;//当页面加载状态改变的时候执行这个方法.
    function subSomething()
    {
    if(document.readyState == "complete") //当页面加载状态为完全结束时进入
    location.href="http://www.google.com"; //这是你的操作
    }
    </script> 
      

  4.   

    <script> 
    function subSomething() 

    location.href="http://www.google.com"; //这是你的操作 

    </script> <body onload="subSomething()">
      

  5.   

    你想跳到不属于自己的网页.加个iframe
    操作iframe
    <html>
    <head>
        <title>circle</title>
        <script type="text/javascript">
            
            var circleNum = 3;
            var url = ['http://www.sina.com','http://www.163.com','http://www.google.cn','http://www.baidu.com'];
            
            function circle()
            {
                setInterval(showPage,3000);
            }
            
            function showPage()
            {
                var page = document.getElementById('page');
                if(circleNum==3)circleNum = 0;
                page.src = url[circleNum];
                circleNum++;
            }
        </script>
    </head>
    <body onload="circle()">
        <iframe id="page" src="http://www.baidu.com"></iframe>
    </body>
    </html>
    不知道你需求是否这样