摘要:
functionchangePrice2money(s){if(/[^0-9]/.test(s))return"invalidvalue";//s=s.replace(/^(\d*)$/,"$1.");//s=(s+"00").replace(/(\d*\.\d\d)\d*/,"$1");//s=s.replace(".",",");varre=/(\d)(\d{3},)/;while(re.test(s))s=s.replace(re,"$1,$2"); 阅读全文
posted @ 2011-06-03 18:09 X龙 阅读(242) 评论(0) 推荐(0) 编辑