请问,一个页面,如果鼠标或键盘没有动的话,过30秒时间就跳到别的页面,在线马上揭分 < s cript LANGUAGE="Javas cript"> <!-- setTimeout('window.open('http://xxxxx);', 30000); --> < /s cript> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <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"> <script language="javascript">setTimeout("test()", 30000);function test(){ window.location.href='index.htm';}</script> 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> 我原来写过,是用在触摸屏上的~~~~用的是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> ExtJS3.4.0的AJAX同步问题怎么解决 pushlet在一个系统中有两个地方同时用到 repeater内如何绑定下拉列表 网站改版,有没有办法保留原来搜索引擎收录的内容? 求一正则,整数部分不超过7位,小数部分可有可无,如果有不超过两位,正负均可 请问怎样动态添加和减少文本框 高分!!求这样的简单代码 字符串的替换 JS读IFRAME里的内容 求用ls帮遍历这样一个json数据 是不是IE5.0中new Array()有问题 问关于用document.write写入代码的执行问题
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">
setTimeout("test()", 30000);
function test()
{
window.location.href='index.htm';
}
</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>
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>