setTimeout("function(){window.location.href=youhtm.htm}",5000);

解决方案 »

  1.   

    好像没有引号,如果上面的不行,这样试试
    setTimeout(function(){window.location.href=youhtm.htm},5000);
      

  2.   

    <html>
    <head>
    <script>
    window.onload=sett;
    function sett()
    {
           document.body.innerHTML=Math.random();
           setTimeout("sett()",500);
    }
    </script>       
    </head>
    <body>
    </body>
    </html>
      

  3.   

    <BODY onLoad="javascript:setTimeout('window.location=url,5000)">
      

  4.   

    写错了,少了个单引号,应该是这样的:<BODY onLoad="javascript:setTimeout('window.location=url',5000)">
      

  5.   

    如果不想让用户按“返回”按钮返回当前页的话可以用location.replace(url)
      

  6.   

    写错了,少了个单引号,应该是这样的:<BODY onLoad="javascript:setTimeout('window.location=url',5000)">
    -----------------
    还是错,还是少了引号:
    <BODY onLoad="javascript:setTimeout('window.location=\"url\"',5000)">
      

  7.   

    <meta http-equiv="refresh" content="5;URL=http://www.meizz.com/">
      

  8.   

    to ccton(ccton):多谢指正^_^