• 如何实现ie禁止返回功能和禁止用户用back space键返回页面(未测试)


    function   setBSkey()   {  
      var   blnEevntCancel   =   false   ;  
       
              if   (window.event   &&   window.event.altKey   &&   (window.event.keyCode   ==   8   ||   window.event.keyCode   ==   37   ||   window.event.keyCode   ==   39   ))   {  
                      blnEevntCancel   =   true   ;  
              }  
      if   (   window.event.keyCode   ==   8   )   {  
      if   (window.event.srcElement.tagName.toUpperCase()   ==   "TEXTAREA")   {  
      if   (   window.event.srcElement.readOnly   ==   true   )   {  
                      blnEevntCancel   =   true   ;  
      }  
      }  
    else   if   (window.event.srcElement.tagName.toUpperCase()   ==   "INPUT"   &&   event.srcElement.type.toUpperCase()   ==   'TEXT')       {  
      if   (   window.event.srcElement.readOnly   ==   true   )   {  
                      blnEevntCancel   =   true   ;  
      }  
      }   else   {  
                      blnEevntCancel   =   true   ;  
      }  
      }  
      if   (blnEevntCancel   ==   true   )   {  
      window.event.cancelBubble   =   true;  
              window.event.returnValue   =   false;  
              return   false;  
      }  
      }

  • 相关阅读:
    macos linux 命令行显示当前全路径方法
    mac 下面使用apidoc 使用
    du 统计文件夹大小
    mac 共享文件和mount挂载数据
    linux与linux、windows之间文件共享的几种方式
    Yaf安装和配置
    设计模式之 里氏替换原则
    设计模式之单一职责原则
    微信支付 遇到问题总结
    bash shell 快捷键
  • 原文地址:https://www.cnblogs.com/RuiLei/p/549266.html
Copyright © 2020-2023  润新知