I need to multiply values from two inputs and put the result into another input. The result needs the commas, but in order to multiply in JavaScript I need to remove the commas from inputs 1 and 2. I tried using the replace() method as well prior to this. I have included my HTML and JS below.
HTML
<div>
<input id="input1" type="text" />
<input id="input2" type="text" />
<input id="input3" type="text" />
</div>
JS
$(document).on("input", "#input1, #input2", function () {
var val1 = parseFloat($("#input1").val());
var val2 = parseFloat($("#input2").val());
var total = val1 * val2;
$("#input3").val(total).trigger("input");
});