最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Retrieved unmasking value from inputmask masking value - Stack Overflow

programmeradmin7浏览0评论

I use input inputmask on my form input, this is code that make mask on my form

$('input[name="jumlah"]').inputmask("decimal", {
        groupSeparator: ".",
        autoGroup: true
});

then i need to get the value from the input with this way

var checkVal = $('input[name="jumlah"]').val();

i keep get mask value,

Ex: on the input field when input number i can see 33.333 value on my field. then i need retrieved only 33333

how to get unmask value from input?

I use input inputmask on my form input, this is code that make mask on my form

$('input[name="jumlah"]').inputmask("decimal", {
        groupSeparator: ".",
        autoGroup: true
});

then i need to get the value from the input with this way

var checkVal = $('input[name="jumlah"]').val();

i keep get mask value,

Ex: on the input field when input number i can see 33.333 value on my field. then i need retrieved only 33333

how to get unmask value from input?

Share Improve this question edited Jun 18, 2016 at 8:08 Soer.05 asked Jun 18, 2016 at 7:51 Soer.05Soer.05 331 silver badge5 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 3

InputMask has a property that might help you: 'removeMaskOnSubmit'

Just set it as true and you should be good.

Something like this:

Inputmask.extendDefaults({
  'removeMaskOnSubmit': true
});

found here (external link)

发布评论

评论列表(0)

  1. 暂无评论