设置输入电话号码为11位,且不能再输入
<input type = "number" >限制只能输入数字
<input type = "number" oninput="if(value.length>11)value=value.slice(0,11)">限制输入的长度为11(type为number)
<input type="text" οninput="value=value.replace(/[^\d]/g,'')" maxlength="11">(type为text)

相关文章:

  • 2021-11-27
  • 2021-11-27
  • 2022-12-23
  • 2021-08-28
  • 2021-06-05
  • 2021-05-27
  • 2021-12-02
猜你喜欢
  • 2021-12-25
  • 2022-12-23
  • 2021-11-15
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案