几秒后关闭界面

function closewin(){
self.opener=null;
self.close();
}
function clock(){
i=i-1
// document.title="本窗口将在"+i+"秒后自动关闭!";
$('.num').html(+i+"秒后自动关闭!");
if(i>0){
setTimeout("clock();",1000);
}else{
this.window.opener = null;
window.close();
}
}
var i=10
clock();

原文地址:https://www.cnblogs.com/yongwang/p/7568662.html