通过正则,设置input只能输入数字

onkeyup="this.value=this.value.replace(/\D/g,'')"

代码如下

  <tr class="b">
    <td width="20%">價格</td>
    <td>
        <input class="input" type="text" onkeyup="this.value=this.value.replace(/\D/g,'')" name="atc_money" value='$threads_buy_price' $htmlcolor $htmlsell>
    </td>
  </tr>

相关文章:

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