//金额增加千分号formatPrice(123456.78) = 123,456.78 function formatPrice(val) { var parts = val.toString().split("."); parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ","); return parts.join("."); } //将/Date(13925635263)/转换成Date function formatDate(val) { return new Date(parseInt(val.replace(/D/igm, ""))); }