Disable the method that invalidates the JavaScript Alert pop-up box. Disable criptalert

Source: Internet
Author: User

Disable the method that invalidates the JavaScript Alert pop-up box. Disable criptalert

This article describes how to invalidate the Alert pop-up box of JavaScript, that is, disabling the JS pop-up warning box.

Because the green internet environment is promoted now, the pop-up box will inevitably affect your mood, so the following code can block the Js pop-up box.

<Script LANGUAGE = "JavaScript"> <! -- Window. alert = function (str) {return;} alert ("alert box cannot be displayed"); // --> </script>

The implementation idea is to rewrite the "alert" method. The rewrite syntax is: "old method = function (parameter) {content of the new method }". The return value must be "false", indicating that no operation is performed. You can also enter javascript: alert (window. alert = function (str) {return;}) in the address bar ;});


Javascript js alert pop-up box

Brother, alert does not belong to JS. It is implemented by calling the system interface. After it pops up, you must click OK to close it or use the task manager.
You can stop the service three seconds later. Instead of using alert, you must define a layer similar to the pop-up warning box to use JS to control it.

In JavaScript learning, the aler () function does not display a warning box, but the alert () function can be triggered with a button to bring up a warning box.

All aler () function names are written incorrectly ....

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.