开发者

javascript to close firefox browser [duplicate]

This question already has answers here: Closed 11 years ago.

Possible D开发者_如何学Cuplicate:

How to close window in firefox using javascript?

i want to close the main Firefox browser window that a user is browsing my site to close automatically using JS.

i came to know that setting dom.allow_scripts_to_close_windows = true in C:\Program Files\Mozilla Firefox\greprefs\all.js will allow this. Please let me know if it is possible to ovrwirte this value using our Javascript.


By default, a browser will only let you close windows via script which were themselves originally opened via script.

It is not possible to modify that value via JS in your page, and should not be. Imagine the implications of allowing a page to modify user preferences...


No. Websites cannot change the user's preferences.


No, you cannot change a browser configuration via JavaScript.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜