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;
}
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;
}