Remove Commas with Jquery

前端 未结 6 2100
北荒
北荒 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 23:01

    This is a clean way to get rid of the commas in one line, without loops.

        var cleanNumber = $("#selector").val().split(",").join("");
    

    Hope can help u!

提交回复
热议问题