Javascript function with 2 arguments
<p>I need to create a function with 2 arguments (<code>price1</code>, <code>price2</code>), which should be added together and the result would be displayed in a text field after adding <code>Vat</code> to them.</p>

<p>Overall, I need to have 3 text fields: <strong>price1</strong>, <strong>price2</strong> and <strong>results</strong>. In addition, the <strong>results</strong> field should be calculated after pushing the button <strong>calculate</strong>.</p>

<p>So far, I've come up with a return function with <code>document.write</code>, but it obviously doesn't display any text fields, which looks like that:</p>

<pre><code>function getTotalPrice(price1,price2,Vat)
{
  var sum=price1+priceb;
  var Vat=20;
  return ((sum*Vat)*100)/100;
}
document.write(getTotalPrice(4,3));
</code></pre>

<p>I have no clue how to create the button that could calculate <code>Vat</code> and display it in the third text box.</p>
