HTML5 Input type=number removes leading zero

前端 未结 5 858
予麋鹿
予麋鹿 2020-12-02 20:05

In Chrome 15, when using the element as a text field, leading zeros (e.g. 011) are removed even if the number entered does not break the validation rules (e.g. min, max).

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 20:50

    that should do it for you. Will bring up the numeric keypad on iPhone and the nicer Android phones I've tested on.

提交回复
热议问题