几秒后关闭界面

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();

posted @ 2017-09-21 15:01  永往  阅读(190)  评论(0编辑  收藏  举报