代码 const number = Math.ceil(balance * 100) / 100; // 向上取两位小数 money = new Intl.NumberFormat('en-GB', { style: 'currency', currency: 'CNY' }).format(number); money = money.replace('CN', ' '); 例子 知识点 Intl.NumberFormat