-
-4 19
定时关闭窗口,效果:

<script>
function closewindow(){
timeid=setTimeout('self.close()',10000);}
var newtime=10;
function text(){
document.title= "本窗口将在 "+newtime+" 秒后关闭";
newtime--;
timeid2=setTimeout('text()',1000);
}
</script><a href="#" onclick="closewindow(); text();">按这里关闭窗口</a>
<div align=center>然后看标题栏的效果!</div>//timeid2=setTimeout('text()',1000);中1000为一秒。如果要延长关闭时间,则修改:
timeid=setTimeout('self.close()',10000);} 中的10000。
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

- 评论(0)
发表评论 TrackBack