自动关闭弹出式窗口

跟随页面弹出的窗口在规定时间内自动关闭,而且不作任何提示

代码:

1<script language="JavaScript">   
2<!--   
3url="popup.htm"   
4window.open(url, 'www_helpor_net', 'width=468,height=60,resizable=1,scrollbars=no,left=100,top=50')   
5\-->   
6</script>

然后,在相同目录下新建一个popup.htm网页(注意要与上面的url对应!),用于显示在弹出窗口中。在新建文件的源代码中加入如下代码:

1<script language="JavaScript">   
2function closeit() {   
3setTimeout("self.close()",10000)   
4}   
5closeit()   
6</script>
Published At
Categories with 网页设计
comments powered by Disqus