标签:
js脚本function:
//js数字千分符处理
function commafy(num) {
num = num + "";
var re = /(-?\d+)(\d{3})/
while (re.test(num)) {
num = num.replace(re, "$1,$2")
}
return num;
}
标签:
原文地址:http://www.cnblogs.com/GerryOfZhong/p/5219614.html