在input上增加onkeyup和onafterpaste事件,事件中用正则表达式替换其它字符,测试没有问题。

<input type="text" value="" />

相关文章:

  • 2021-09-23
  • 2021-08-01
  • 2021-06-20
  • 2022-12-23
  • 2021-08-01
  • 2021-12-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案