JavaScript converte string para 2 decimal
var twoPlacedFloat = parseFloat(yourString).toFixed(2)
Worried Wombat
var twoPlacedFloat = parseFloat(yourString).toFixed(2)
(3.141596).toFixed(2); // 3.14
var myNumber=12.2345;
var myNumberWithTwoDecimalPlaces=parseFloat(myNumber).toFixed(2); //12.23
var example = 3.35464464374256 ;
example = parseFloat(example.toFixed(2)) ; // example == 3.35