Why is the window.close() works in IE browser but not FireFox? "Warning: Scripts may not close windo
来源:互联网 发布:golang java 性能对比 编辑:程序博客网 时间:2024/06/05 12:42
Firefox has an issue with you trying to close a window that wasn't opened by a script.
Here is the error that I pulled out of the FireFox error console.
"Warning: Scripts may not close windows that were not opened by script."
Seems like an extra security measure on FireFox's part.
Hi boston_ma,
Just as what you said, the reason why the code 'window.close();' doesn't work in FireFox is caused by the security setting in the browser. And to deal with the issue, we need to open the professional config page in the FireFox and change the option in it.
Here are the steps you can follow by to set this security option in FireFox.
1. Open a blank page and type "about:config" in the Url text box. Here, you will receive a warning message, just click the button to continue.
2. Find the "dom.allow_scripts_to_close_windows" item in the list and doulbe click it to make the value be equal to 'true'. (You can enter 'allow' in the filter box to get the item more quickly)
Then, you can use 'window.close();' to close the window in FireFox now.
- Why is the window.close() works in IE browser but not FireFox? "Warning: Scripts may not close windo
- window.close() doesn't work - Scripts may not close windows that were not opened by script.
- firefox 下 'innerText' works in IE, but not in Firefox
- window.close and self.close do not close the window in Chrome
- window.close()提示 "Scripts may close only the windows that were opened by it"
- [乐意黎原创] window.close()提示 "Scripts may close only the windows that were opened by it"
- Why is .innerText not working in Firefox?
- $.ajax not working in chrome but is working in firefox and IE
- firefox 支持window.close()
- ‘close’ was not declared in this scope
- ‘close’ was not declared in this scope
- ‘close’ was not declared in this scope
- 'close' was not declared in this scope
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- Warning: Attempt to present * on * whose view is not in the window hierarchy!
- XCode 6 , IOS 8 中使用 use size classes 的时候 自动调整 自定义table cell的宽度
- 第十三周OJ平台(3)统计元音字母个数
- 大数据的前世今生-大数据特征与发展历程
- 13周(数组删掉3的倍数)
- OJ项目三
- Why is the window.close() works in IE browser but not FireFox? "Warning: Scripts may not close windo
- html固定浮动在底部div的实现效果
- 一张图帮你看懂 iPhone 6 Plus 的屏幕分辨率
- 第十三周上机项目一(5)数据大折腾
- Mantle with CoreData
- 第十三周项目五字符串操作(2)将str1和str2接起来存放到str3中
- CodeForces 490E Restoring Increasing Sequence
- 监听器
- 第13周项目4-数组的排序-(2)