When the input type is number, maxlength is invalid

 <input type="number" oninput="if(value.length>30)value=value.slice(0,30)" placeholder="请输入设备编号" />

Use oninput events, so you can limit the length

Guess you like

Origin blog.csdn.net/joyvonlee/article/details/106419730