Примеры для jQuery .unload()


To display an alert when a page is unloaded:

1
2
3
$( window ).unload(function() {
return "Bye now!";
});