title: I want to store input value in a var and show in HTML empty <p></p> using jquery
body: <p>I want to store an input value in a variable and show it in an existing, currently empty <code>&lt;p&gt;</code> tag, using jQuery. My current code:</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
  
  
  &lt;script type="text/jquery-2"&gt;
      $(function(){
          $("#input_name")#submit(function){
              var value = $("input_name").val();
              $('#p').text.value();
          });
      });
  &lt;/script&gt;
  
  
  
  &lt;form&gt;
      &lt;input type="text" id="input_name" size="10" maxlength="10" /&gt;
      &lt;input type="submit" id="submit" value="submit" /&gt;
  &lt;/form&gt;
  
  &lt;p id="P"&gt;
  
  &lt;/p&gt;
  </code></pre>