title: How do I use the submit()-function to read out a form and show the content
body: <p>I want to use the submit()-function to read out a text from a form-field and display it again. But, upon pressing the submit-button nothing happens. With a diffrent event-handler like keyup() everything works fine. Any suggestions?</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() {
      $("#name")
      .on("submit", function(e) {
          e.preventDefault();
          var namenew = $(this).val();
          $("p.show").html("Hello &lt;strong&gt;" + (namenew) + "&lt;/strong&gt;");
      });  
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;section&gt;
          &lt;label for="name"&gt;Name&lt;/label&gt;
          &lt;input type="text" id="name"&gt;
          &lt;input type="submit" id="submit"&gt;
          &lt;p class="show"&gt;Hello &lt;strong&gt;Unknown&lt;/strong&gt;&lt;/p&gt;
      &lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>