才发现elinput的属性 type="number"时,maxlength不起作用??? 解决方案:使用oninput <input type="number" oninput="if(value.length>9)value=value.slice(0,9)">