87,907
社区成员
发帖
与我相关
我的任务
分享
<%
session.setMaxInactiveInterval(-1);
%>
<script language=javascript>
var x = 0; var timer;
function testtimeout(){
timer = setTimeout("checktimeout()",10000);
}
checktimeout=function(){
alert("已经超时!");
parent.window.location.replace("../index.jsp");
}
function stoper() {
clearTimeout(timer);
testtimeout();
}
document.onmousemove=stoper;
document.onkeydown=stoper;
</script>
<form name=xcv>
<input type=button onClick="testtimeout()" value=start>
<input type=button onClick="stoper()" value=stop>
</form>
<script language=javascript>
var x = 0; var timer;
function testtimeout(){
timer = setTimeout("checktimeout()",10000);
}
checktimeout=function(){
alert("已经超时!");
self.top.window.location.replace("../index.jsp");
}
function stoper() {
clearTimeout(timer);
testtimeout();
}
document.onmousemove=stoper;
document.onkeydown=stoper;
</script>