To display an alert when a page is unloaded: : unload « jQuery « JavaScript Tutorial






$(window).unload( function () { alert("Bye now!"); } );
30.113.unload
30.113.1.Unload event
30.113.2.To display an alert when a page is unloaded: