title: How to get the search box value in <p> tag - HTML,JS
body: <p>Am new to javascript i foud this one in <a href="http://w3schools.com" rel="nofollow noreferrer">w3schools.com</a> -  <strong>Entering pincode in search box will show in <code>&lt;p&gt;</code> tag</strong> !! How to do ? any help appreciated. Thanks in advance </p>
  
  <p><strong>HTML :</strong></p>
  
  <pre><code>&lt;form class="form1" role="search" method="get" action="search-pincode.html"&gt;
  &lt;input class="pincode1" type="number" placeholder="Enter Postcode" id="user-pincode"&gt;
  &lt;button class="submit" type="submit" formaction="search-pincode.html" onclick="myFunction()"&gt;Check&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>JS SCRIPT :</strong></p>
  
  <pre><code>    &lt;script&gt;
      function myFunction() {
      var x = document.getElementById("user-pincode").value;
      document.getElementById("user-pincode-show").innerHTML = x;
      }
      &lt;/script&gt;
  </code></pre>
  
  <p><strong>OUTPUT : search-pincode.html</strong></p>
  
  <pre><code>                &lt;h1 class="search-h1-contact"&gt;
                  Yes, we install CCTV in &lt;p id="user-pincode-show"&gt;&lt;/p&gt;
                  &lt;/h1&gt;
  </code></pre>