HTML input box length limit

The length of many input boxes in HTML can directly use maxlength to limit the length of the input value, but recently in the development of aap, it was found that maxlength is not supported when type='number', that is to say, it does not work, but it can only be controlled by js down

<input class="" type="number" placeholder="请输入购买数量"  oninput="if(value.length>5)value=value.slice(0,8)">

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327042299&siteId=291194637