2
Answers

add two decimal numbers in jquery

I am getting values from textbox and adding. instead of addition result, it is returning Concatination result. Please Help me out of this problem.

My code is bellow


var FBTL = parseFloat($("#txtFBTotalIntake").val()).toFixed(2) +
parseFloat($("#txtFBPumpPrime").val()).toFixed(2)+
arseFloat($("#txtFBCrystalloid").val()).toFixed(2) +
parseFloat($("#txtFBBlood").val()).toFixed(2);
 
I am entering 10, 0 , 0, 0 respectively,
And its returning 10.000.000.000.00 

Answers (2)