javascript - jquery masked input plugin set value digits -


$(".id").mask("999-99-9999-999-99"); 

i have above mask input format want know if possible have predefined value x number of characters example

i want first 5 letters have default , unchangeable numbers.

sample number be

639-27-9999-999-99

here numbers 639-27- should there meaning when input has focus automatically put there , cannot changed.

f.y.i

plugin

a workaround solution might be,

$.mask.definitions["9"] = null; $.mask.definitions["^"] = "[0-9]"; $(".id").mask("639-27-^^^-^^^-^^"); 
  1. remove definition 9
  2. add definition numeric regex new key ex. ^
  3. use new definition

fiddle

hope helps


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -