function stopDefault( e ) {
   // Prevent the default browser action (W3C)
   if ( e && e.preventDefault )
      e.preventDefault();
   else
   // A shortcut for stoping the browser action in IE
      window.event.returnValue = false;
   return false;
}
需要在按键事件中调用上面的函数,即可进行屏蔽,例:
if(e.code!=8)
       keyValue = kc.get(e.code);
else
       backspace(e);

相关文章:

  • 2022-02-09
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2021-09-04
  • 2021-12-04
  • 2021-12-19
猜你喜欢
  • 2021-08-03
  • 2021-11-19
  • 2021-08-07
  • 2021-06-30
相关资源
相似解决方案