window.close()在Firefox的使用

日期:2009-04-08    阅读:134   分类:Javascript

window.close()在IE下可以执行关闭,但在Firefox下不关闭,不是JS代码window.close()的问题,而是Firefox的配置问题,解决方法如下:

在Firefox地址栏里输入 about:config
在配置列表中找到dom.allow_scripts_to_close_windows
点右键的选切换把上面的false修改为true即可。 
注:默认是false,是为了防止脚本乱关窗口

当然,如果是通过window.open打开的窗口,是可以关闭的。

本页链接: http://www.scriptlover.com/static/521-close-firefox

标签:

相关文章

网友评论

#1: 2009-4-8 23:18:00 by 小淡

test for replay

#2: 2009-4-14 10:23:00 by asato

http://wind-flowers.net

Leave a comment

 required

 required (Not published)

 required