<script type="text/javascript">
var time=10;
function closeWindow(){
window.setTimeout('closeWindow()',1000);
if(time>0){
document.getElementById("show").innerHTML=" 倒计时<font color=red>"+time+"</font>秒后关闭当前窗口";
time--;
}
else{
window.opener=null; //关闭窗口时不出现提示窗口
window.close();
}
}
</script>
<body οnlοad="closeWindow();">
<div id="show">
倒计时10秒后关闭当前窗口
</div>
|