javascript - How to display mask in text input control -


how make such thing happen input box shows underscore/underline right when click input box , type dashes keep getting replaced characters.

like in case phone no. there 10-digit underscore/underline there click on input box , fill in contact no. characters replace underscore/underline.

enter image description here

like there 'mobile' input box, want work in following way:

  • it should show blank (white) when idle when clicked should show ten character underscores/underlines/dashes depicts 10-digit phone no. required filled in.

    e.g. mobile +91(0): ____________________

  • then, start typing in dashes should start replaced numbers typed. if 2 numbers/digits typed there should 8 dashes following 2 numbers/digits typed.

    e.g. mobile +91(0): 98________________

  • and should keep on going 5 numbers down should follows

    e.g. mobile +91(0): 99887__________

and on. numbers/digits have been filled in input box dashes totally replaced typed in numbers, shows user 10-digits have been filled in , no number has been left out.

use jquery jqxmaskedinput

jqxmaskedinput represents jquery input widget uses mask distinguish between proper , improper user input. can define phone number, ssn, zip code, dates, etc. masks setting jqxmaskedinput mask property.

here link

http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxmaskedinput/jquery-masked-input-getting-started.htm


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -