【发布时间】:2021-02-27 08:15:42
【问题描述】:
如何将印度货币中的数字转换为 html 显示?
var formatter = new Intl.NumberFormat('en-IN', {
style: 'currency',
currency: 'INR',
minimumFractionDigits: 2,
});
$( document ).ready(function() {
var sum = 0;
$(".number").each(function(){
sum += +$(this).val();
});
$(".total").val(formatter.format(sum));
});
【问题讨论】:
-
还有什么问题?似乎工作正常。