Numbers with commas in Javascript

后端 未结 4 1360
無奈伤痛
無奈伤痛 2020-12-24 08:02

I have a javascript function that accepts a number and performs a mathematical operation on the number. However, the number I\'m passing in could have a comma in it, and fr

4条回答
  •  余生分开走
    2020-12-24 08:17

    Just replace all the commas with a blank.

    You can follow this: http://blog.techsaints.com/2007/06/25/javascript-how-to-remove-all-commas-from-a-number/

提交回复
热议问题