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
a workaround solution might be,
$.mask.definitions["9"] = null; $.mask.definitions["^"] = "[0-9]"; $(".id").mask("639-27-^^^-^^^-^^");
- remove definition
9
- add definition numeric regex new key ex.
^
- use new definition
hope helps
Comments
Post a Comment