每三位加小数点
<script type="text/javascript"> String.prototype.format = function(){ return this.replace(/\d(?=(?:\d{3})+\b)/g,function(v) { return v + ','; }); } var a = 76884526; alert(a.toString().format()); //return 67,884,526.88</script>