用正则实现金额千分位用逗号分隔的方法 JS

var a = 222122122.6754; 
var b = a.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');

降序排列

data.Table.sort(function (a, b) { return a.value - b.value; })

猜你喜欢

转载自blog.csdn.net/zhaohanqq/article/details/84951014
今日推荐