title: Get input field value and redirect using Javascript
body: <p>I wanna obtain input field data in a Javascript variable and perform a redirect.</p>
  
  <pre><code>&lt;form onsubmit="someRandomFunction()"&gt;
  &lt;input type="search" name="search" id="search_bar" placeholder="Type a string"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Now, I have HTML files namely, xyz.html, abc.html, pqrs.html etc..
  I want the user to get redirected on the page whose name he types.. For example, searching for the string pqrs should redirect the user to pqrs.html.. Please help me with the code for the Javascript function..</p>