JS控制表单输入只能为数字:onpropertychange='if(/[^\-?\d*\.?\d{0,2}]/.test(this.value)) this.value=this.value.replace(/[^\-?\d*\.?\d{0,2}]/,"")'