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

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

    Use this JavaScript.

    $(":input").inputmask();
    $("#phone").inputmask({"mask": "(999) 999-9999"});
    

提交回复
热议问题