input type类型为number时,maxlength失效 加一段js吧, <input type="number" oninput="if(value.length>6)value=value.slice(0,6)" />