title: inputs need to equal zero before action
body: <p>how can i get each input to equal zero before it is touched so that i dont get an error until every input is completed and not have it show in the input field. Also this is for money and im struggling to get the two decimal point thing down. thank you</p>
  
  <p>
      
      </p>
  
  <pre><code>&lt;td&gt;Subtotal&lt;/td&gt;
  &lt;td class="total" id="tot" for="tot"&gt;
  &lt;input type="total" id="total"&gt;
  &lt;script type="text/javascript"&gt;
  function myFunction()
  {
  var answer = document.getElementById('total');
  var n = 0
  var x = document.getElementById('itemprice');
  var y = document.getElementById('itemprice1');
  var z = document.getElementById('itemprice2');
  //var d = document.getElementsById('itemprice3');
  
  // parseFloat converts to values, otherwise you'll concatenate the strings.
  answer.value = parseFloat(x[0].value) + parseFloat(y[0].value) + parseFloat(z[0].value); // + d.value;
                                                                  }
  
                                                                  &lt;/script&gt;
  
                                                                  &lt;/td&gt;   
  </code></pre>