How can I remove AutoNumeric formatting before submitting form?

后端 未结 11 3046
栀梦
栀梦 2021-02-19 05:26

I\'m using the jQuery plugin AutoNumeric but when I submit a form, I can\'t remove the formatting on the fields before POST.

I tried to use $(\'input\

11条回答
  •  故里飘歌
    2021-02-19 06:08

    I came up with this, seems like the cleanest way. I know it's a pretty old thread but it's the first Google match, so i'll leave it here for future

    $('form').on('submit', function(){
        $('.curr').each(function(){
            $(this).autoNumeric('update', {aSign: '', aDec: '.', aSep: ''});;
        });
    });
    

提交回复
热议问题