zoukankan      html  css  js  c++  java
  • 手机移动端弹出框alert和确认狂confirm去掉网址

    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;
        };

  • 相关阅读:
    图论复习
    数据结构复习
    数学复习
    字符串算法复习
    还有9天就要走了
    JS 多个一维数组排例组合的所有可能
    PHP 多个一维数组排列组合的所有可能
    维护DOWNID
    LINUX
    Multiple Versions of PHP run on server
  • 原文地址:https://www.cnblogs.com/jorzen1984/p/6816789.html
Copyright © 2011-2022 走看看