title: What is wrong with my code for a basic calculator?
body: <p>I'm trying to program a calculator, but I can't find the bug in my code. Here's my code:</p>
  
  <pre><code>  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;*&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form&gt;
  &lt;input type="number" placeholder="Enter a number" id="val1"&gt;&lt;br&gt;
  times&lt;br&gt;
  &lt;input type="number" placeholder="Enter a number" id="val2"&gt;&lt;br&gt;
  &lt;input type="button" value="Calulate" onClick="myFunction()"&gt;
  &lt;script&gt;
  function myFunction(){
  var val1 = document.getElementById(val1)value;
  var val2 = document.getElementById(val2)value;
  var result = val1*val2;
  alert("The result " + result);
  }
  &lt;/script&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>If you know how, and want to, can you help me to make it a calculator for +,-,:,* etc all in one? Thank you very much!</p>