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 from my limited experience with Javascript I am having problems working with that value. It doesn’t seem to treat that as a numeric type.
What’s the easiest way to take a parameter with a value of 1,000 and convert it to a numeric 1000?
You can set up your textbox to have an onblur() function so when the user attempts to leave the textbox, you then remove the commas from the value by using the javascript replace function
example:
With input tag here: