This article will introduce the method to invalidate JavaScript's Alert popup box, that is, to prohibit JS from popping up warning boxes.
Because green Internet environments are now advocated, pop-up boxes 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("Cannot pop up warning box");//--></script>The implementation idea is to rewrite the "alert" method, and the syntax of the rewrite is: "Old method = function(parameter){the content of the new method}". The return value should be "false", which means that no operation is performed. You can also enter in the address bar: javascript:alert(window.alert=function(str){return;});