Javascript exit popup in firefox
Hi, I am trying to use a javascript exit alert box, i tested it in all other browsers and it is not showing the exit popup text in firefox. Do you know how it can show the text in firefox. here is the code
<script type="text/javascript">
window.onbeforeunload = function() { return "This is my text that should show in firefox"; }
</script>
Hi, I am trying to use a javascript exit alert box, i tested it in all other browsers and it is not showing the exit popup text in firefox. Do you know how it can show the text in firefox. here is the code
<script type="text/javascript">
window.onbeforeunload = function() { return "This is my text that should show in firefox"; }
</script>
所有回覆 (1)
Firefox has a dom.disable_beforeunload pref to disable this feature, so you can check this pref on the about:config page.
See also:
Since 25 May 2011, the HTML5 specification states that calls to window.alert(), window.confirm(), and window.prompt() methods may be ignored during this event. See the HTML5 specification for more details.