why is <input type=“number” maxlength=“3”> not working in Safari?

后端 未结 8 1454
刺人心
刺人心 2020-12-09 01:55

I like to have an input with maximum 3 characters. In Firefox everything works fine I can only write 3 numbers inside the input - but in safari you can write a lot of number

8条回答
  •  悲&欢浪女
    2020-12-09 02:21

    You may try to user type="text" and oninput as below. This will let the numbers only.

    
    

提交回复
热议问题