ExtJS:处理浏览器退出事件(点击交叉出口) [英] ExtJS : handling browser exit event (click on cross-exit)

查看:135
本文介绍了ExtJS:处理浏览器退出事件(点击交叉出口)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,谢谢你阅读我的问题。
我想知道是否有任何方法来处理浏览器退出事件。



例如,我想在用户点击时发送查询在交叉出口或只是关闭浏览器。



非常感谢。



$ t0rM

解决方案

这个线程可能会有一些洞察力:
http://forums.devarticles.com/javascript-development-22/how-to- stop-browser-from-closing-using-javascript-8458.html



我还没有给这个解决方案进行测试。但是似乎有可能。



这是对 onbeforeunload 事件处理程序的更深入的讨论。
http://bytes.com/topic/javascript / insights / 825556-using-onbeforeunload-javascript-event



然后总是有一个 quirksmode 。不幸的是,加载/卸载事件尚未被Quirksmode覆盖。如页面所述:


我还没有测试加载和卸载事件;他们将被添加到表格。



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.

Thanks a lot.

$t0rM

解决方案

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.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆