title: Java Script Gross/Net Pay Calculator
body: <p>Hey I have been having trouble getting the code for the calculate button to function with the code I have.For some reason it isn't displaying correctly. When I click the calculate button to figure out the gross pay and net pay, the button does not calculate the gross pay and net in the input boxes. After I enter the hours worked and pay rate.  PLEASE HELP....</p>
  
  <pre><code>&lt;html&gt;
  &lt;title&gt;Gross Pay and Net Pay.&lt;/title&gt;
  &lt;h1&gt; Gross Pay and Net Pay.&lt;/h1&gt;
  &lt;body&gt;
  Hours: &lt;input id="hours" type="text"&gt;&lt;br&gt;
  Rate: &lt;input id="rate" type="text"&gt;&lt;br&gt;
  Gross: &lt;input id="hours * rate" type="text"&gt;&lt;br&gt;
  Net: &lt;input id= "gross * .9" type="text"&gt;&lt;br&gt;
  
  
  &lt;input type="button" value="Calculate" onclick="myFunction()"&gt;
  
  &lt;p id="demo"&gt;&lt;/p&gt;
  &lt;p id="demo2"&gt;&lt;/p&gt;
  
  
  &lt;script&gt;
  
  function myFunction() {
  var hours = document.getElementById('hours').value;
  var rate = document.getElementById('rate').value;
  var gross = document.getElementById('hours * rate');
  var net = document.getElementById('gross * .9 ');
  
  
  if (gross != null) {
  document.getElementById("demo").innerHTML = 
      "Your gross pay is $" + gross + ".";
  }
   if (net != null) {
      document.getElementById("demo2").innerHTML = 
      "Your net pay is $" + net + ".";
  }
  }
  &lt;/script&gt;
  
  &lt;body&gt;
  &lt;html&gt;
  </code></pre>