將數(shù)字轉(zhuǎn)換成帶千分位的字符串const a = 12345678;方法一:a.replace(/\d{1,3}(?=(\d{3})+$)/g,'$&,')方法二:a.toLocalString()方法三: