标签:
function format(input) { var n = parseFloat(input).toFixed(4); var re = /(\d{1,3})(?=(\d{3})+(?:\.))/g; return n.replace(re, "$1,"); }
千分位保留4位小数
原文地址:http://www.cnblogs.com/songfahzun/p/5007731.html