增加千分位顯示---
//千分位效果
function commafy(num) {
num = num + "";
var re = /(-?\d+)(\d{3})/
while (re.test(num)) {
num = num.replace(re, "$1,$2")
}
return num;
}
參考資料:
http://hchsjerry.blogspot.com/2008/03/javascript.html
解除千分位--
value.replace(/[,]+/g,"");
參考資料:
http://www.programmer-club.com/ShowSameTitleN/javascript/7743.html