masked input not working in android mobiles?

后端 未结 8 1204
一生所求
一生所求 2020-12-14 15:17

I am using the digitalbush masked input jQuery plugin. It is working fine in web browsers and the iPhone browser perfectly, but it is not working for Android mobile devices.

8条回答
  •  余生分开走
    2020-12-14 15:57

    I tried using the raw script that Jonathan Rowny mentioned, but I was still having the same problem on an S3 - Chrome browser. I think it has something to do with inputs type="tel" and/or type="number". I ended up having to use another plugin. http://igorescobar.github.io/jQuery-Mask-Plugin/

    jquery-mask (not to be confused with jquery-masked-input) is very similar but the syntax was slightly different. Hope this helps anyone else with this issue.

    jquery-masked-input syntax: $("#phone").mask("(999) 999-9999");

    VS

    jquery-mask syntax: ('#phone').mask('(000) 000-0000');

提交回复
热议问题