How can I limit possible inputs in a HTML5 “number” element?

前端 未结 26 2931
感动是毒
感动是毒 2020-11-22 05:12

For element, maxlength is not working. How can I restrict the maxlength for that number element?

26条回答
  •  情书的邮戳
    2020-11-22 05:18

    Or if your max value is for example 99 and minimum 0, you can add this to input element (your value will be rewrited by your max value etc.)

    
    

    Then (if you want), you could check if is input really number

提交回复
热议问题