1. Avoid pop-up prompts
I searched a lot on the Internet, and most of the answers were to set window.onbeforeunload=null, but it didn’t work after trying it out.
After I put this question away for two days, I came back and thought about it again, and finally found the answer. I would like to share it with you here:
Release jquery exit page pop-up prompt (1) Unbind first and set the pop-up content to null.
2. Other related [Abstract]
(1)window’s onunload and onbeforeunload events
The following refers to the implementation in js, not the method of
!Model 1:
Model 2:
For model 2:
1).ie single window and ie7 multi-window need to close the entire browser to trigger
2). Refresh of other multi-window browsers. Closing a single page or closing the entire page will not trigger
(2) Create a leave prompt box
Bind beforeunload event
Unbind
The above is all the content described in this article, I hope you all like it.