<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>
详细解决方案
每三位添小数点
热度:287 发布时间:2012-08-24 10:00:21.0
相关解决方案