摘要: function thousandBitSeparator(num){ var re=/\d{1,3}(?=(\d{3})+$)/g; var n1=num.toString().replace(/^(\d+)((\.\d+)?)$/,function(s,s1,s2){return s1.replace(re,"$&,")+s2;}); return n1;... 阅读全文
posted @ 2018-05-11 18:22 程序员丁先生 阅读(277) 评论(0) 推荐(0) 编辑