去除alert显示域名

页面中加入下面代码即可:

 1  (function(){
 2         window.alert = function(name){
 3           var iframe = document.createElement("IFRAME");
 4           iframe.style.display="none";
 5           iframe.setAttribute("src", 'data:text/plain');
 6           document.documentElement.appendChild(iframe);
 7           window.frames[0].window.alert(name);
 8           iframe.parentNode.removeChild(iframe);
 9         }
10 })();

猜你喜欢

转载自www.cnblogs.com/zhangxin123/p/11821338.html