Home > Web Front-end > JS Tutorial > How to close the javascript warning box

How to close the javascript warning box

王林
Release: 2020-05-07 15:19:08
Original
3749 people have browsed it

How to close the javascript warning box

Implementation ideas:

Rewrite the "alert" method. The rewritten syntax is: "old method = function (parameter) {content of the new method}" , the return value should be "false", which means no operation is performed.

Specific code:

<script LANGUAGE="JavaScript">
<!--
window.alert = function(str){
return ;
}
alert("不能弹出警示框");//-->
</script>
Copy after login

Recommended tutorial: js entry tutorial

The above is the detailed content of How to close the javascript warning box. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template