Input type “number” won't resize

后端 未结 7 1560
面向向阳花
面向向阳花 2020-12-13 05:45

Why won\'t my input resize when I change the type to type=\"number\" but it works with type=\"text\"?

EXAMPLE

    Email: &l         


        
7条回答
  •  伪装坚强ぢ
    2020-12-13 06:00

    What you want is maxlength.

    Valid for text, search, url, tel, email, and password, it defines the maximum number of characters (as UTF-16 code units) the user can enter into the field. This must be an integer value 0 or higher. If no maxlength is specified, or an invalid value is specified, the field has no maximum length. This value must also be greater than or equal to the value of minlength.

    You might consider using one of these input types.

提交回复
热议问题