问题解决了,非常感谢
1
2
3
4
5
6
7
|
window._alert = window.alert //临时保存一下; window.alert = function (){ //写你重构的方法; return ; } //下面你想恢复的话就很简单了 window.alert = window._alert; |
1
2
3
4
5
6
7
8
9
10
11
12
|
< html > < head > < title >aa</ title > < script type = "text/javascript" > var userName; function greetUser() { alert(‘Hello, I am your pet rock.‘); } </ script > </ head > < body onload = "greetUser();" ></ body > </ html > |
原文:https://www.cnblogs.com/yanxiatingyu/p/9383846.html