title: getting a value from a form
body: <p>IM trying to test to see if my code is set up right to access the text value of a form. im just trying to access text value and then use Console.log to confirm that its getting that far.</p>
  
  <p>here is my code(</p>
  
  <pre><code>&lt;body&gt;
          &lt;form id="form"&gt;
          &lt;input type="text" id="item"&gt;
          &lt;button class="Btn add item"&gt;Add item&lt;/button&gt;
          &lt;/form&gt;
          &lt;script type="text/javascript"&gt;
            document.getElementById("item").onclick = function() {
             var output = document.getElementById("item").value;
  
             console.log(output);
            }
          &lt;/script&gt;
        &lt;/body&gt;
  </code></pre>
  
  <p>When I run it in the Dev tools in chrome nothing happens. No error and console doesn't log the value I entered into the form.</p>