simon551
IS-IT--Management
- May 4, 2005
- 249
I found this code somewhere that helps me handle formatted numbers on an input. I would like to modify it so it will accept negative numbers (and not convert them to positive)
Code:
function convertToDouble(v){
var str = Number(v.replace(/[^0-9\.]+/g,""));
num= (parseFloat(str));
return num;
}