function transformAmount(s) {//千分位显示
s=parseFloat(s);//去除首位输入的0,如002,小数不影响parseFloat字符串转数字
s=s.toString();
s = s.replace(/^(\d*)$/, "$1.");
s = (s + "00").replace(/(\d*\.\d\d)\d*/, "$1");
s = s.replace(".", ",");
var re = /(\d)(\d{3},)/;
while (re.test(s))
s = s.replace(re, "$1,$2");
s = s.replace(/,(\d\d)$/, ".$1");
return s.replace(/^\./, "0.");
}
s=parseFloat(s);//去除首位输入的0,如002,小数不影响parseFloat字符串转数字
s=s.toString();
s = s.replace(/^(\d*)$/, "$1.");
s = (s + "00").replace(/(\d*\.\d\d)\d*/, "$1");
s = s.replace(".", ",");
var re = /(\d)(\d{3},)/;
while (re.test(s))
s = s.replace(re, "$1,$2");
s = s.replace(/,(\d\d)$/, ".$1");
return s.replace(/^\./, "0.");
}