function format (num) {
 return (num.toFixed(2) + '').replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,');
}
var num = 12345;
alert(format(num));
作者 铁血 汉子 2017年2月27日
2024/04/23/03:31:14pm 2017/2/27/9:04:37
0 1675