来自:http://community.csdn.net/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 οnlοad="timeId=setTimeout('doClose()',5000)" οnmοusemοve="clearTimeout(timeId);timeId=setTimeout('doClose()',5000)">
</BODY>
</HTML>
三秒钟没有动作自动关闭。
<script>
var c=1;
setInterval("if(c--<=0){window.opener=null;window.close()}",3000)
document.οnmοusemοve=new Function("c=1");
document.οnkeydοwn=new Function("c=1");
</script>。
<script>
var c=1;
setInterval("if(c--<=0){window.opener=null;window.close()}",3000)
document.οnmοusemοve=new Function("c=1");
document.οnkeydοwn=new Function("c=1");
</script>