autoNumeric 未按预期工作

autoNumeric not working as expected

alert($('input[type=text]#A_CLAIM_AMT1').val());
$('input[type=text]#A_CLAIM_AMT1').autoNumeric('init',{vMin:'0.00',vMax:'99999999999.99',aSign:'',aSep:',',aPad: false,mDec:'2',aDec:'.'});
alert($('input[type=text]#A_CLAIM_AMT1').val());

我正在使用 jsp,当我向服务器发送值为 A_CLAIM_AMT1 = 555,555 的请求时...一些服务器端验证已完成,然后响应返回到jsp 具有相同的字段值 ... 所以第一个警报打印 555,555 .... 但第二个 returns 555.56 最后打印为字段值

我能够通过添加来修复它:

aForm: false

因此:

$('input[type=text]#A_CLAIM_AMT1').autoNumeric('init',{vMin:'0.00',vMax:'99999999999.99',aSign:'',aSep:',',aPad: false,mDec:'2',aDec:'.',aForm: false});