js里千位分隔符

total=123456

total.toString().replace(/\B(?=(\d{3})+$)/g,',')
     

猜你喜欢

转载自blog.csdn.net/qq_36818077/article/details/84791183