I need to implement text-input in html, that: 1. user can press only digits 2. user can press max 4 digits.
Those are things that I know how to do, but I need that if user press less then 4 digits- so on lost focus - it will be completed to 4 digits by adding zero-digits at left-side as need.
How can I implement it?
Is there any way to implement all of the three requirements in on line? May be by jquery mask?