zoukankan      html  css  js  c++  java
  • 屏蔽F1~F12的快捷键的js函数

    function window.onhelp(){return false} //屏蔽F1帮助 
    /*keyCod从113-123分别禁用了F2-F12键,13禁用了回车键(Enter),8禁用了退格键(BackSpace)*/ 
    document.onkeydown = function(){ 
    if(window.event && window.event.keyCode == 113) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 114) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 115) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 116) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 117) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 118) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 119) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 120) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 121) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 122) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 123) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 13) { 
    window.event.keyCode = 505; 
    if(window.event && window.event.keyCode == 8) { 
    alert(str+"\n请使用Del键进行字符的删除操作!"); 
    window.event.returnValue=false; 
    if(window.event && window.event.keyCode == 505){ 
      alert(str) 
    window.event.returnValue=false; 
  • 相关阅读:
    2.airflow参数简介
    KETTLE元数据表
    KETTLE监控
    KETTLE设置变量
    KETTLE集群搭建
    KETTLE并行
    Android TextView setText内嵌html标签
    Android Fragment实现分屏
    Java基础之String,StringBuilder,StringBuffer
    踩过的坑之-----selector
  • 原文地址:https://www.cnblogs.com/top5/p/2415989.html
Copyright © 2011-2022 走看看