Math Round Function
<p>I'm using a form that use the following script to calculate the item price including VAT:</p>

<pre><code>function calculateTotaleIVA() {
          var tot = document.getElementById('totale').value;
          document.getElementById('totale_prodotto').value = Math.round(tot*121)/100;
          totale_prodotto.value = document.getElementById('totale_prodotto').value.replace(".", ",");
          totale.value = document.getElementById('totale').value.replace(".", ",");
          }
</code></pre>

<p>This function works fine but I have a questions. Some times the result is like this:</p>

<p>46,4</p>

<p>I want to see at screen two digits after point decimal like this:</p>

<p>46,40</p>

<p>How can I fix the above function to solve it?</p>

<p>Thanks in advance.</p>
