关闭从JavaScript的Firefox标签 [英] Close firefox tab from javascript
本文介绍了关闭从JavaScript的Firefox标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想关闭JavaScript中的Firefox标签。请不要误解我。我不是试图关闭弹出窗口,但选项卡。我知道JavaScript不能关闭它没有打开的窗口。因此,我尝试了下面的代码,但它适用于所有浏览器,但不是在Firefox。
window.open('','_ self' , '');
Window.close();
解决方案
如果您有单个/您可以访问Firefox,您可以更改 about:config
设置。
dom.allow_scripts_to_close_windows = true
这可能是一个很大的安全问题!
$ b
(在Linux上使用Firefox 27测试)
I want to close Firefox tab from JavaScript. Please do not misunderstand me. I am not trying to close popup window but tab. I know JavaScript cannot close the window which it has not opened. Therefore I tried below code but it works in all browsers but not in Firefox.
window.open('','_self','');
Window.close();
解决方案
If you have a single/few-user page and you have access to the Firefoxes you can change the about:config
settings.
dom.allow_scripts_to_close_windows = true
This might be a big security issue!
(Tested with Firefox 27 on Linux)
这篇关于关闭从JavaScript的Firefox标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文