来自:http://community.youkuaiyun.com/Expert/topicview.asp?id=3118953
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script>
function doClose()
{
window.opener=null;
window.close();
}
</script>
</HEAD>
<BODY onload="timeId=setTimeout('doClose()',5000)" onmousemove="clearTimeout(timeId);timeId=setTimeout('doClose()',5000)">
</BODY>
</HTML>
三秒钟没有动作自动关闭。
<script>
var c=1;
setInterval("if(c--<=0){window.opener=null;window.close()}",3000)
document.onmousemove=new Function("c=1");
document.onkeydown=new Function("c=1");
</script>。
<script>
var c=1;
setInterval("if(c--<=0){window.opener=null;window.close()}",3000)
document.onmousemove=new Function("c=1");
document.onkeydown=new Function("c=1");
</script>