屏蔽IOS端alert窗口带URL的方法

时间:2020-03-05 19:06:37   收藏:0   阅读:72

window.alert = function(name){
var iframe = document.createElement("IFRAME");
iframe.style.display="none";
iframe.setAttribute("src", ‘data:text/plain,‘);
document.documentElement.appendChild(iframe);
window.frames[0].window.alert(name);
iframe.parentNode.removeChild(iframe);
}

技术分享图片

 

原文:https://www.cnblogs.com/szqtiger/p/12421686.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!