html中输入框对金额字段的控制

版权声明:不卑不亢,不骄不躁---好男人就是我,我就是曾哥. https://blog.csdn.net/weixin_42884584/article/details/83786965
<input id="amt" type="text" name="amt" placeholder="金额/元" title="金额/元" 
							required="required" onkeyup="this.value=/^[0-9]*\.?[0-9]{0,2}$/.test(this.value) ? this.value : this.value.substring(0,this.value.length-1)"/>元

猜你喜欢

转载自blog.csdn.net/weixin_42884584/article/details/83786965
今日推荐