I\'d like to know that a user leave from a Web page. I think there might be three scenarios: 1. move to another page in the same Web site, either open a new window or load a
You can't detect opening a new window or tab, but you can listen for the 'onunload' event.
jQuery(window).bind("unload", function() { //your code here });
This should fire when clicking on a link, closing the tab/window or pressing the back button.