屏蔽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)