输入数字第一位不能为0,不能输入小数点,中文,英文。
且输入整数以外的内容时,输入框违规内容不会一闪而过
<input type="tel" oninput="var v=this.value||'';v=v.replace(/[^\d]/g,'');if(v.length==1 && v==0){v=''};this.value=v.substr(0,3);">
文章不定期更新,喜欢可给like~
输入数字第一位不能为0,不能输入小数点,中文,英文。
且输入整数以外的内容时,输入框违规内容不会一闪而过
<input type="tel" oninput="var v=this.value||'';v=v.replace(/[^\d]/g,'');if(v.length==1 && v==0){v=''};this.value=v.substr(0,3);">
文章不定期更新,喜欢可给like~