< s cript LANGUAGE="Javas cript"> <!-- 
setTimeout('window.open('http://xxxxx);', 30000); 
--> < /s cript> 

解决方案 »

  1.   

    <script language="JavaScript">
    function screensave(){
    test.value++;
    if(test.value==5)
    top.location.href='index.asp';
    }
    function screenopen(){
    test.value=0;
    }
    </script>
    <body onkeydown="screenopen()" onmousemove="screenopen()" onload="setInterval('screensave()',1000)">
    5 秒返回首页<input id="test">
      

  2.   

    <script language="javascript">
    setTimeout("test()", 30000);
    function test()
    {
    window.location.href='index.htm';
    }
    </script>
      

  3.   

    Try...<script> 
    var c=1; 
    setInterval("if(c--<=0)location.replace('http://www.baidu.com')",3000) 
    document.onmousemove=new Function("c=1");
    document.onkeydown=new Function("c=1");
    </script>
      

  4.   

    我原来写过,是用在触摸屏上的~~~~用的是event方法写的,捕获键盘和鼠标事件~~~忘了怎么搞了~~~先给你写个简单的你用用试试吧~~~~<script>
    tmp = 0;//计数器
    function keypress()
    {
    tmp = 0;//按下键时,计数器清零
    }
    function mousemove()
    {
    tmp = 0;//鼠标移动时,计数器清零
    }
    function timeout()
    {
    if(tmp > 30)//记数大于30时跳转
    window.location.href='index.htm';
    else//否则累加
    tmp++;
    }</script>
    <body onKeyup="keypress();" onmousemove="mousemove();" onload="setTimeout("timeout", 1000);//每一秒检测一次
    ">
    </body>