js 金额加逗号,添加千分符

const number = 1234567;
console.log(number.toLocaleString()); // 输出: "1,234,567"

posted @ 2025-08-20 16:38  幻影之舞  阅读(19)  评论(0)    收藏  举报