i have masked input text box take id , amount. if user enter amount , come out of text box value getting changed. below code , example.
<label>phone number</label> <input id="phone" type="text" value="" />
jquery(function($) { $("#phone").mask("?a-9999 $99999.99"); });
the out put of masking a-1234 $12345.00
if user enter amount a-1___ $12345.67
, comes out, value became a-1123 $4567_.67
. want value saty user entered. please me solve issue. in advance.
there many masked input plugins jquery, , didn't got 1 using question.
i suggest pick better 1 here: https://plugins.jquery.com/tag/mask/
you may want use 1 http://robinherbots.github.io/jquery.inputmask/
i built jsfiddle here implementing same function:
jquery(function($) { $("#phone").inputmask("a|a-9999 $99999.99"); });
Comments
Post a Comment