javascript to close firefox browser [duplicate]
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.
精彩评论