<html>
<head>
<title>只能输入正整数</title>
</head>
<body>
兑换数量:<input type="text" ID="txtNumber" Width="50px" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
                                    onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'0')}else{this.value=this.value.replace(/\D/g,'')}" />
<input type="button" ID="btn1" value=" 兑  换 " OnClick='return confirm("确定兑换?");' />
</body>
</html>

  

相关文章:

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