ExtJS : handling browser exit event (click on cross-exit)
问题 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. 回答1: 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