zoukankan      html  css  js  c++  java
  • 禁止浏览器打开控制台~

    1、单纯的禁止

    window.oncontextmenu = function () { return false; }

    2、禁止键盘打开

    window.onkeydown = window.onkeyup = window.onkeypress = function () { window.event.returnValue = false; return false; }

    3、禁止开发者工具打开

    var h = window.innerHeight, w = window.innerWidth; window.onresize = function () { if (h != window.innerHeight || w != window.innerWidth) { window.close(); window.location = "about:blank"; } }

    4、你妹的开发者工具是全屏了怎么搞

    if (window.addEventListener) { window.addEventListener("DOMCharacterDataModified", function () { window.location.reload(); }, true); window.addEventListener("DOMAttributeNameChanged", function () { window.location.reload(); }, true); window.addEventListener("DOMCharacterDataModified", function () { window.location.reload(); }, true); window.addEventListener("DOMElementNameChanged", function () { window.location.reload(); }, true); window.addEventListener("DOMNodeInserted", function () { window.location.reload(); }, true); window.addEventListener("DOMNodeInsertedIntoDocument", function () { window.location.reload(); }, true); window.addEventListener("DOMNodeRemoved", function () { window.location.reload(); }, true); window.addEventListener("DOMNodeRemovedFromDocument", function () { window.location.reload(); }, true); window.addEventListener("DOMSubtreeModified", function () { window.location.reload(); }, true); }

  • 相关阅读:
    Webform Session、Cookies传值,跳转页面方式
    webform 光棒效果,删除操作弹出确定取消窗口
    webform Repeater、地址栏传值、Response
    WebForm 控件
    WebForm 页面传值
    WebForm——IIS服务器、开发方式和简单基础
    身份证件号的验证与更改
    历届试题 带分数
    算法提高 学霸的迷宫
    算法提高 最大乘积
  • 原文地址:https://www.cnblogs.com/cq1715584439/p/13389968.html
Copyright © 2011-2022 走看看