首页 > 移动平台 > 详细

清除ios系统alert弹出框的域名

时间:2020-01-13 16:45:37      阅读:179      评论:0      收藏:0      [点我收藏+]

清除ios系统alert弹出框的域名

<script>
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);
};
window.confirm = function(message) {
    var iframe = document.createElement("IFRAME");
    iframe.style.display = "none";
    iframe.setAttribute("src", ‘data:text/plain,‘);
    document.documentElement.appendChild(iframe);
    var alertFrame = window.frames[0];
    var result = alertFrame.window.confirm(message);
    iframe.parentNode.removeChild(iframe);
    return result;
};
</script>

  

清除ios系统alert弹出框的域名

原文:https://www.cnblogs.com/wrld/p/12187649.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!