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

后端 未结 5 1233
广开言路
广开言路 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:04

    A little late, but a useful plugin that will actually use a mask to give a bit more restriction on user input.

    (999) 999-9999

    More info on the plugin https://www.jasny.net/bootstrap/2.3.1/javascript.html#inputmask

提交回复
热议问题