用JS可以实现:setTimeout("函数名",10000)

解决方案 »

  1.   

    可我不知该如何写代码,假如说我开篇名字是start.aspx,主页是index.aspx,我应如何写这代码
      

  2.   

    <script>
    function goto()
    {
        self.location.href="default.asp";
    }function ftime()
    {
        setTimeout(goto(),5000); //1000为一秒
    }
    </script><body onload="ftime()">
    </body>
      

  3.   

    <html>
    <head>
    <title>asdf</title>
    <script language="vbscript">
    <!--
    dim x
    sub goother(x)
    if x=1then
    location.replace "b.htm"
    end if
    end sub
    id=settimeout ("goother(x)",3000)
    -->
    </script>
    </head>
    <body>
    3秒后自动转到b.htm
    <script language="vbscript">
    <!--
    x=1
    -->
    </script>
    </body>
    </html>
      

  4.   

    <html><head><title></title>
    <script language=javascript>
    function gotoStart()
    {
      document.location.replace("start.aspx",3000);
    }
    function myTimer()
    {
      setTimeout("gotoStart()",3000);
    }
    </head>
    <body onload="myTimer()">
    </body></html>