只匹配数字及字母的正则

<input  type="text"

onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')"

  />

只匹配纯数字的正则

<input  type="text"

onkeyup="this.value=this.value.replace(/[^0-9]+/g,'')"

  />

相关文章:

  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2021-09-19
  • 2021-11-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案