What html5 form attribute should be used for a zipcode?

前端 未结 8 2033
我寻月下人不归
我寻月下人不归 2021-02-01 02:51

Is it best to use a \'text\' attribute with a limit on the number of characters, or can I use a number attribute in an input for a zipcode.

Just trying to get my head ar

8条回答
  •  攒了一身酷
    2021-02-01 03:18

    Type set tel to show numeric keypad, pattern to except values 0-9 and max set to prevent values beyond US 7 digit zip codes.

提交回复
热议问题