JQuery Masked Input - mask the first part of a social security number

风流意气都作罢 提交于 2019-12-11 06:21:11

问题


I'm using jQuery masked input pluigic for social security number masking. I want the first 5 characters to be masked like a password. I was able to mask as shown in demos but I am not able to get masking as XXX-XX-1234

Need, kind of a password-like masking where the first five characters would be masked with 'X' and the rest will be shown normally. Any direction would be appreciated, thanks in advance.


回答1:


Though its an old post, but i have had similar requirement and I came up with https://github.com/mishraas/jQuery-SSN-Field-Masking. You may want to have a look at it.




回答2:


This should work if you need a secure input mask but this is probably going to break most android devices as they seem to have trouble with the standard masked input from DigitalBush. But worth a shot : http://jqueryscript.nhavungtau.vn/demo/jQuery-Plugin-To-Mask-Numbers-In-Text-Field-Secure-Number-Mask



来源:https://stackoverflow.com/questions/24266567/jquery-masked-input-mask-the-first-part-of-a-social-security-number

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!