Home > front end >  How to determine under the Chrome beforeunload event is response when the window close or refresh re
How to determine under the Chrome beforeunload event is response when the window close or refresh re

Time:10-13

See the link: https://blog.csdn.net/weixin_38964895/article/details/82345243
Found that the scheme is not suitable for Chrome,
The key is the following judgment in this code,
 window. Event. ClientY & lt; 0 | | window. Event. AltKey | | window. The event. CtrlKey 

No clientY window. The event object, altKey, ctrlKey these attributes,
Under the Chrome if get more information?
Or what events in Chrome can only response when the window closed?

CodePudding user response:

This problem is no solution,
Online method of solution is 6 times,
Most now is to determine whether the press F5, click the refresh button is unable to determine,


  • Related