title: ParseFloat goes NaN
body: <p>Hello everyone i have this code</p>
  
  <pre><code>function computeChange(){
  var change;
  var amountDue = parseFloat(document.getElementById("amountDue").value);
  var amountReceive = parseFloat(document.getElementById("amountReceive").value);
  change = amountReceive - amountDue;
  document.getElementById('amountChange').innerHTML = change;
  }
  
  
  
  &lt;td&gt;Total Amount&lt;/td&gt;
  &lt;td&gt;Php:&lt;span id="amountDue"&gt;&lt;?php echo $sum; ?&gt;&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Amount Paid&lt;/td&gt;
  &lt;td&gt;&lt;input type="number" id="amountReceive" required="required" maxlength="4" size="4" onKeyUp="computeChange()"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Change&lt;/td&gt;
  &lt;td&gt;Php:&lt;span id="amountChange"&gt;&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>on the total amount is a decimal<br>
  on the amount paid input type=text</p>
  
  <p>So the problem is if i enter something in the text box the span on change goes <code>NaN</code></p>