JS把数字转换为千分位字符串 静文Sophie 2023-04-04 64 阅读1分钟 方法1 Number(num).toLocaleString() 方法2 String(num).replace(/\B(?=(\d{3})+(?!\d))/g, ',')