When sending an email via Hotmail, But we haven't finished writing the mail and ordered other pages, He will give a very user-friendly prompt to avoid us accidentally clicking the wrong location, it makes the hard-to-Write email content lost and has simple functions, but it feels good. I will paste the code here.
The specific effect is as follows:
The Code is as follows:
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en"
Http://www.w3.org/TR/html4/loose.dtd>
<HTML>
<Script language = JavaScript>
Function stoprefresh ()
{
Return "you will lose any unsaved content !! ";
}
Function unloadconfirm ()
{// Events after page exit
Alert ('some cleanup work after leaving the page ...... ');
}
</SCRIPT>
<Body>
<SCRIPT>
Window. onbeforeunload = stoprefresh; // register the event before closing
Window. onUnload = unloadconfirm; // register the closed event
</SCRIPT>
Find information software such as CRM, OA, ERP, invoicing, and supply chain management
</Body>
</Html>