title: Sending form data to HTML Page and Retrieving it with Javascript without any PHP/Python
body: <p>I've read a few articles and a question thread on sending form data to another html page, but the solutions didn't solve the issue for me.</p>
  
  <p>Basically, I have a form with a bunch of data:</p>
  
  <pre><code>&lt;form id="registration" name="registration" action="register.html" method="POST"&gt;
  </code></pre>
  
  <p>In register.html, I tried accessing an input text field with id and name as "username" with this:</p>
  
  <p>var x = document.getElementById("registration").elements.namedItem("username").value;</p>
  
  <p>The console stated that it cannot read property of null. How can I access these values with Javascript only? Frameworks are fine but not PHP /Python.</p>