JQuery Unload Event Example
Click this link
Google
or close the browser window to occur unload event.