输出 12,000,000
参考链接:
= 5) {
str[0] = str[0].replace(/(\d)(?=(\d{3})+$)/g,'$1,');
}
if (str[1] && str[1].length >= 5) {
str[1] = str[1].replace(/(\d{3})/g,'$1 ');
}
return str.join('.');
}
原文链接:https://www.f2er.com/note/422533.html