ios alert弹出 去掉显示网址

    xiaoxiao2024-07-25  17

     ios 浏览器 alert弹出网址  解决办法

     以下是代码   直接 加上下面的js 就可以  当有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); }

    alert("xxxx");

    </script?

    转载请注明原文地址: https://ju.6miu.com/read-1291015.html
    最新回复(0)