H5弹框去掉URL

2017-11-07  本文已影响9人  唐岭云
    $(function() {
        window.alert = function(name) {
            var iframe = document.createElement("IFRAME");
            iframe.style.display = "none";
            iframe.setAttribute("src", 'data:text/plain,');
            document.documentElement.appendChild(iframe);
            console.info(window.frames[0].window);
            window.frames[0].window.alert(name);
            iframe.parentNode.removeChild(iframe);
        };
    })
上一篇 下一篇

猜你喜欢

热点阅读