How to capture the browser window close event?
I want to capture the browser window/tab close event.I have tried the following with jQuery: jQuery(window).bind( "beforeunload", function() { return confirm("Do you really want to close?") })But it works on form submissi