input只能输入小数点保留2位的正数
<input type="text" placeholder="请输入" onkeyup="this.value= this.value.match(/d+(.d{0,2})?/) ? this.value.match(/d+(.d{0,2})?/)[0] : ''" />
input只能输入正整数
<input type="text" placeholder="请输入" onkeyup="this.value=this.value.replace(/D|^0/g,'')" onafterpaste="this.value=this.value.replace(/D|^0/g,'')">