function format(val){
return (val+"").replace(/(\d)(?=(\d{3})+$)/g, "$1,");
}
JS正则表达式实现千分位
最新推荐文章于 2024-05-16 14:38:12 发布
function format(val){
return (val+"").replace(/(\d)(?=(\d{3})+$)/g, "$1,");
}