Home  >  Article  >  Web Front-end  >  Two ways to prevent alert from popping up_javascript techniques

Two ways to prevent alert from popping up_javascript techniques

WBOY
WBOYOriginal
2016-05-16 16:48:021684browse
Copy code The code is as follows:


Define the overloaded alert function function window.alert(str ){} into a public js file, you will no longer have to worry about alert

If you still need to be prompted, use this method to define
function window.alert(str){
/ / Open a modal dialog box here to display the str string and close it with a delay of 20ms
}
Statement:
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