在这篇文章里,我已经编写了12个超有用的正则表达式,这可是WEB开发人员的最爱哦。
1.在input框中只能输入金额,其实就是只能输入最多有两位小数的数字
//第一种在input输入框限制
<input type="text" maxlength="8" class="form-control" id="amount" style="margin-right: 2px;" value="" onChange="count();" onkeyup="if (this.value==this.value2) return; if (this.value.search(/^\d*(?:\.\d