This is a very easy Input and Output Mask for strings.
It do NOT change the basic input data. By filling the input-field there comes up a kind of control-box with the masked data. The submitted data can be stored (in a eg. DB) without the masking characters. This makes searching much easier.
There is also a function for output. Printing the Data it will be masked.
Example: ###-##-##-#### > 123-45-67-8901
(#) represents any charakter in the masking data
(-) will be added to the string (it can be used any other character else)
Just load bobmask.js in your code.
You have to set up some additional css:
Take a look in the demo, please - its really simple.