title: Cant get input text value with jquery
body: <p>I want to get the text of the input text field on click of the go button. I have read a few tutorials on this, followed them step by step, but still failed to do so. Here is my code :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function go() {
    content.html($("#textfield").value);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;&lt;/head&gt;
  
  &lt;body&gt;
    &lt;div id="content"&gt;
      &lt;input type="text" id="textfield"&gt;
      &lt;button type="button" id="btn" onclick="go()"&gt;Go&lt;/button&gt;
    &lt;/div&gt;
    &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>May I ask what is wrong with it?</p>