<input onkeyup='change(this,hi4);'  onkeypress="var key=window.event?event.keyCode:event.which;return (key>=48&&key<=57)||(key==8)" onpaste="return clipboardData.getData('text').match(/^\d+$/)!=null;" class='text' type='text' value='123' style='width:20px;text-align:center;margin:0 4px;IME-MODE:disabled;' ondragenter="return false" maxlength=3  />

onkeypress 只可以输入正整数

onpaste 只可粘贴正整数

oncontextmenu='window.event.returnValue=false' table 中禁止右键 IE8中通过 火狐不好用

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2021-12-18
相关资源
相似解决方案