<input type="text" maxlength="5" /> The effect is ok, when <input type="number" maxlength="5" /> maxlength is invalid, and the length can be input infinitely.
liberation plan:
<input type="number" oninput="if(value.length>5)value=value.slice(0,5)" />
It's easy, get it done!