jquery Disable F5 refresh

Source: Internet
Author: User

Made a page, comment on the time, there is a UL can show, but here with Ajax, local refresh, if clicked click the Browser Refresh button, UL inside there is no content

To avoid this, I want to disable the refresh feature of the page


For a while, find the following code to disable F5 "I tested three browsers, IE and Firefox can, 360 security browsers can not"

However, there is no code to disable the browser refresh button, I think this should not be, and the various browsers should also be different


<script language= "JavaScript" > $ (document). Bind ("KeyDown", function (e) {
e=window.event| | E
if (e.keycode==116) {
E.keycode = 0;
return false; Mask F5 Refresh Key
}
});

</script>


Forget, also dare not continue to opportunistic, or orderly from backstage get good O (∩_∩) o~

See friends, have opinions, welcome to publish Ha

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.