Remove the alert display domain

Add the following code to the page:

 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 })();

 

Guess you like

Origin www.cnblogs.com/zhangxin123/p/11821338.html