How to detect if they left the Webpage?
I need to be able to know if the user minimized t开发者_StackOverflow中文版he webpage or went to another Tab in their browser, Is that possible?
Afraid not, the closest you can get is blur/focus on the window object like this:
$(window).blur(function() { console.log('left'); });
$(window).focus(function() { console.log('came back'); });
精彩评论