我刚刚学会了这个,非常好用啊!
<html>
<head>
<script language="JavaScript">
//Written By Griefforyou.
//2004-12-03
var timeout=30;
function CloseWindow(){
if(timeout==0) document.getElementById("WebBrowser").ExecWB(45,1);
else {
timeout--;
document.getElementById("time").innerText=timeout;
}
setTimeout("CloseWindow()",1000)
}
</script>
</head>
<body onload="javascript:CloseWindow()">
该页将在<span id=time> </span>秒后自动关闭
<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>
</body>
</html>
[此贴子已经被静夜思于2005-1-5 22:28:36编辑过]