Download This Plugin
Back To jQueryScript.Net
jQuery pageleave Plugin Example
Move your mouse to the location bar to see it in action.