0
I have an input field that gets a value. I would like to remove letters and special characters from the value of that input, leaving only numbers. I think it would be easier to use a replace with a regular expression, but I’m not getting it. Could someone help me?
I tried so:
valor.replace(/\d|,/g, "");
Only it does nothing.