zoukankan      html  css  js  c++  java
  • 重写Alert和confirm方法去除地址显示

    //重写alert方法,去掉地址显示
    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);
    }

    //重写confirm方法,去掉地址显示
    window.confirm = function(name){
    var iframe = document.createElement("IFRAME");
    iframe.style.display="none";
    iframe.setAttribute("src", 'data:text/plain,');
    document.documentElement.appendChild(iframe);
    var result = window.frames[0].window.confirm(name);
    iframe.parentNode.removeChild(iframe);
    return result;
    }

  • 相关阅读:
    snmp
    iOS 精确定时器
    iOS 用命令实现简单的打包过程
    OpenSSH
    IOS 逆向工程之砸壳
    UNIX相关知识
    BSD历史
    linux grep命令
    为什么国外程序员爱用Mac?
    iOS xcuserdata
  • 原文地址:https://www.cnblogs.com/stubborn-donkey/p/7243791.html
Copyright © 2011-2022 走看看