Home  >  Article  >  Web Front-end  >  Determine the user's online status onbeforeunload event_javascript skills

Determine the user's online status onbeforeunload event_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:09:541350browse

Needless to say, getting the user's login status is a bit problematic. It is a bit problematic to judge whether the user has left. If the user triggers the exit event and leaves according to the designer's regulations, it will not be difficult. However, there are many ways for users to leave. How to determine the user's departure? What about the immediate decision to leave when leaving illegally? The most common illegal exit is to close the browser.

Copy code The code is as follows: