admin管理员组文章数量:1353261
I'm using Robin Herbot's inputmask jquery plugin, and I am getting output as expected but I want it with mas i.e. 12,345.67 and with 2 decimals.
$('#currency').inputmask({'mask':"9{0,10}[.9{0,2}]", greedy: false});
I'm using Robin Herbot's inputmask jquery plugin, and I am getting output as expected but I want it with mas i.e. 12,345.67 and with 2 decimals.
$('#currency').inputmask({'mask':"9{0,10}[.9{0,2}]", greedy: false});
Share
Improve this question
edited Dec 6, 2022 at 16:48
sergiol
4,3455 gold badges49 silver badges88 bronze badges
asked Jul 12, 2017 at 20:58
NainNain
973 silver badges11 bronze badges
1 Answer
Reset to default 9I have managed to make it working with following code
$('#currency').inputmask({
'alias': 'decimal',
'groupSeparator': ',',
'autoGroup': true,
'digits': 2,
'digitsOptional': false,
'placeholder': '0.00'
});
so the actual output looks like this
12,312,311.00
Hope this helps
本文标签: javascriptrobin herbot39s inputmask with commas and 2 decimal placesStack Overflow
版权声明:本文标题:javascript - robin herbot's inputmask with commas and 2 decimal places - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743905403a2559428.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论