正则限制input只能输入大于0的数字

onkeyup="this.value=this.value.replace(/\D|^0/g,'')" onafterpaste="this.value=this.value.replace(/\D|^0/g,'')"

转载于:https://www.cnblogs.com/douglasvegas/p/7283781.html