javascript - How to replace comma and point from a string -
this question has answer here:
i number format string input box like: 1,033.00 how can convert 1033 jquery/javascript? have use converted number add number.
you can string replace numberstring= numberstring.replace ( /[^0-9]/g, '' );
to add number can use +
operator convert numberstring number value.
var numberstring= numberstring.replace ( /[^0-9]/g, '' ); var addition = +numberstring + anothernumber;
Comments
Post a Comment