title: Change value of input field inside form with 'getElementById'
body: <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form&gt;
  &lt;input type="number" id="number1"&gt;
  &lt;input type="number" id="number2"&gt;
  &lt;button onclick="dosomething"&gt;Click Me&lt;/button&gt;
  &lt;/form&gt;
  &lt;script&gt;
  function dosomething(){
  document.getElementById("number2").value=document.getElementById("number1").value
  }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The JS function would change the number inside the second input field of the form, but it's not happenning.</p>
  
  <p>May I know what went wrong? Thanks! </p>