Easiest way to mask characters in HTML(5) text input

后端 未结 5 1231
广开言路
广开言路 2020-12-28 14:33

Does HTML5 have any kind of text field masking or do I still have to trap onkeydown etc.?

jbabey is right--\"masking\" as in blocking certain illegal ch

5条回答
  •  滥情空心
    2020-12-28 15:26

    1. Basic validation can be performed by choosing the type attribute of input elements. For example:

    2. using pattern attribute like:

    3. required attribute

    4. maxlength:

    5. min & max:

提交回复
热议问题