원본 : http://junyong.tistory.com/165
//콤마찍기
function numberFormat(num) {
var pattern = /(-?[0-9]+)([0-9]{3})/;
while(pattern.test(num)) {
num = num.replace(pattern,"$1,$2");
}
return num;
}
//콤마제거
function unNumberFormat(num) {
return (num.replace(/\,/g,""));
}
var num_comm = numberFormat(1256252);