A textbox has a property of storing a string which has a type telephone number or zip code.
Where and when a user starts typing the keys should fill the textbox in a telephone/zip code format.
For example –
1st Pattern is 234-23432,
2nd Pattern is (234)24234-324.
So when user types in some keys the characters should be arranged accordingly. Does not matter if the solution uses plain JavaScript or jQquery
From page. you can use following code . you can test it on jsfiddle