解决方案,给表单增减oninput事件,以截取11位手机号为例 <input type="number" oninput="if(value.length>11)value=value.slice(0,11)" />
评论前必须登录!
注册