js 實現千位分隔符

js 實現千位分隔符 描述:數字的千位分隔符表示法,好比126186312轉化爲126,186,312。web function numFormat(num) { var c = (num.toString().indexOf ('.') !== -1) ? num.toLocaleString():num.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '
相關文章
相關標籤/搜索