网页无动作时自动关闭
<script language="JavaScript"><!--
var meizz; //设置一个全局变量
var n = 300 * 1000; //时间设置(300秒)
meizz = setTimeout("window.opener='meizz';window.close();", n);
function autoClose()
{
clearTimeout(meizz);
meizz = setTimeout("window.opener='meizz';window.close();", n);
}document.attachEvent("onmousemove", autoClose);
document.attachEvent("onkeydown", autoClose);
//--></script>
<script language="JavaScript"><!--
var meizz; //设置一个全局变量
var n = 300 * 1000; //时间设置(300秒)
meizz = setTimeout("window.opener='meizz';window.close();", n);
function autoClose()
{
clearTimeout(meizz);
meizz = setTimeout("window.opener='meizz';window.close();", n);
}document.attachEvent("onmousemove", autoClose);
document.attachEvent("onkeydown", autoClose);
//--></script>
var c=3; //设置时间(3秒)
setInterval("if(c--<0)window.close()",1000)
document.onmousemove=new Function("c=3")
document.onkeydown=new Function("c=3")
</script>
var c=3; //设置时间(3秒)
setInterval("if(c--<0){window.opener=null;window.close()}",1000)
document.onmousemove=new Function("c=3")
document.onkeydown=new Function("c=3")
</script>