Number(1).toFixed(2); // 1.00
Number(1.341).toFixed(2); // 1.34
Number(1.345).toFixed(2); // 1.34 NOTE: See andy's comment below.
Number(1.3450001).toFixed(2); // 1.35
document.getElementById('line1').innerHTML = Number(1).toFixed(2);_x000D_
document.getElementById('line2').innerHTML = Number(1.341).toFixed(2);_x000D_
document.getElementById('line3').innerHTML = Number(1.345).toFixed(2);_x000D_
document.getElementById('line4').innerHTML = Number(1.3450001).toFixed(2);
_x000D_
<span id="line1"></span>_x000D_
<br/>_x000D_
<span id="line2"></span>_x000D_
<br/>_x000D_
<span id="line3"></span>_x000D_
<br/>_x000D_
<span id="line4"></span>
_x000D_