Tips for turning off Web page Popup

Source: Internet
Author: User

Tips to turn off Web page popup:
In many sites have this feature, click Close the current page, will pop up a prompt box, you can choose to close or not close the current page, the following describes how to implement this function, code examples are as follows:

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.51texiao.cn/" /><title>Ant Tribe</title><Scripttype= "Text/javascript">Window.onbeforeunload=function(){   return "Are you sure you want to leave this page?"; } </Script> </Head> <Bodystyle= "Text-align:center">Close the current page will pop up a prompt box! </Body> </HTML>

The above code is implemented by clicking the Close Current page button will pop up a prompt whether to close the current button's prompt box.

The original address is: http://www.51texiao.cn/javascriptjiaocheng/2015/0405/121.html

Tips for turning off Web page Popup

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.