解决方案 »
- 关于json获取
- 网页复制内容大于200个字符 自动添加来源 这个怎么实现
- Ext中谷歌浏览器如何显示客户端的图片?
- JavaScript中对象Array中的reverse是怎么实现的呀?我的写这个函数怎么不行呀
- 动态创建正则表达式,可以不使用new吗?
- 请高手帮帮我, 为哈我点上面的地区具体名字,下面<input>里面不会变化
- 表单提交数据赋值JS的问题-请net_lover帮忙解答
- 求json to array并显示array!!!
- 怎么对document做xpath查询?
- 麻烦的问题,关于动态函数绑定!(高手请进)
- js中有什么事件页面是打开而不是刷新?
- 在线高分求解fusionChartsV3简单问题,动态改变数据源报错???
{
location='/';
}
setTimeout("test('http://www.baidu.com')", 30000);
function test(str){
window.location = str;
}
ss = setInterval("keyDown();", 10000);
function keyDown(event) {
if (window.event) {
//处理函数
window.clearInterval(ss);
}
else {
if (confirm("您已经10秒钟没有操作,即将跳到首页,确定?")) {
document.location.href = "/";
}
}
}
document.onkeydown = keyDown;
</script>
timer=setTimeout('location="/"',delay);document.onclick=document.onkeydown=function(){
clearTimeout(timer);//有动作时清除上一次的计时器
timer=setTimeout('location="/"',delay);//重新计时
}
这么写才对 event 要判断浏览器, 搂住可以试一试