ExtJS的:处理浏览器退出事件(点击交叉出口) [英] ExtJS : handling browser exit event (click on cross-exit)
问题描述
首先,感谢您阅读我的问题。
我想知道是否有任何方法来处理浏览器退出事件。
First of all, thank you for reading my question. I would like to know if there is any way to handle the browser exit event.
例如,我想发送一个查询,当用户点击交叉退出或简单地关闭他的浏览器。
For example, I would like to send a query when the user click on the cross-exit or simply close his browser.
非常感谢。
$ t0rM
推荐答案
这线程可能会脱落一些见解:
<一href=\"http://forums.devarticles.com/javascript-development-22/how-to-stop-browser-from-closing-using-javascript-8458.html\">http://forums.devarticles.com/javascript-development-22/how-to-stop-browser-from-closing-using-javascript-8458.html
This thread might shed some insight: http://forums.devarticles.com/javascript-development-22/how-to-stop-browser-from-closing-using-javascript-8458.html
我没有给这个解决方案一个尚未测试运行。但似乎可能的。
I haven't given this solution a test-run yet. But it seems possible.
下面是关于 onbeforeunload
事件处理程序进行更深入的讨论。
<一href=\"http://bytes.com/topic/javascript/insights/825556-using-onbeforeunload-javascript-event\">http://bytes.com/topic/javascript/insights/825556-using-onbeforeunload-javascript-event
Here's a more in-depth discussion on the onbeforeunload
event handler.
http://bytes.com/topic/javascript/insights/825556-using-onbeforeunload-javascript-event
再有就是始终怪异模式。不幸的是,装载/卸载事件尚未被怪异模式覆盖。作为页面上注明:
And then there's always quirksmode. Unfortunately the load/unload events are not yet covered by quirksmode. As stated on the page:
我没有测试的装载和卸载事件之中;他们将被添加到表以后。
I haven’t tested the load and unload events yet; they’ll be added to the table later on.
这篇关于ExtJS的:处理浏览器退出事件(点击交叉出口)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!