问题
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