Remove Commas with Jquery

前端 未结 6 2106
北荒
北荒 2021-02-12 22:02

I am in need of some code that removes commas from a string. I currently have a variety of numbers in the number_format() for PHP. I use Jquery to post certain things to a updat

6条回答
  •  旧巷少年郎
    2021-02-12 22:47

    Less is more! (sometimes!)

    $(document).ready(function(){
    var **stripString** = $('.money').text().replace(/,/g, '');
    $('.*money*').text(**stripString**);
    });
    

提交回复
热议问题