javascript two decimal places number code example
Example 1: jquery 2 decimal places
var total = 100.525444
var final_total = total.toFixed(2); // 100.52
Example 2: javascript convert int to float with 2 decimal places
float_num.toFixed(2);
var total = 100.525444
var final_total = total.toFixed(2); // 100.52
float_num.toFixed(2);