Js monitors IE Firefox to close, refresh, roll back, and forward events, js Firefox

Source: Internet
Author: User

Js monitors IE Firefox to close, refresh, roll back, and forward events, js Firefox

<Html> 

Js checks whether the rollback button is executed

This is hard to do. Because the browser processing method is different. Chrome and ie will reload the js and restore all the states. The js that should be taken should be reloaded, but firefox will not. That is to say, setting a flag in Firefox makes it easy to judge, but chrome and ie cannot.
 
Js captures the page closing event. In my opinion, how can I not refresh in IE and trigger the event upon a refresh?

If it is not refreshed once, the page will load and execute onBeforeUnload. When you move the mouse, onmouseout = "ClosesWindow = true;
Another reason may be that these event handler functions are not compatible with ie. Try another method.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.