Input type “number” won't resize

后端 未结 7 1602
面向向阳花
面向向阳花 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:11

    Rather than set the length, set the max and min values for the number input.

    The input box then resizes to fit the longest valid value.

    If you want to allow a 3-digit number then set 999 as the max

     
    

提交回复
热议问题