function thousandBitSeparator(num){
      var re=/\d{1,3}(?=(\d{3})+$)/g;
      var n1=num.toString().replace(/^(\d+)((\.\d+)?)$/,function(s,s1,s2){return s1.replace(re,"$&,")+s2;});
      return n1;
    }

 

相关文章:

  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
相关资源
相似解决方案