title: How to make site go into right link
body: <p>I want to get a user input from input text, so I made form on html file:</p>
  <pre><code>&lt;form class=&quot;inputform&quot;&gt;
    &lt;input type=&quot;text&quot; id=&quot;getinput&quot; autocomplete=&quot;off&quot;&gt;
    &lt;button id=&quot;hrefbutton&quot; type=&quot;submit&quot; onclick=&quot;hrefinput()&quot;&gt;Search&lt;/button&gt;
  </code></pre>
  <p>And I wrote Javascript on head of HTML file:</p>
  <pre><code>function hrefinput(){
    const inputs = document.getElementById('getinput').value;
    alert(inputs);
    window.location.href = &quot;http://localhost/index/&quot; + inputs;
  }
  </code></pre>
  <p>And, everytime I test this code, I succesfully get alert with my inputs on, but the site would only goto &quot;<code>http://localhost/index/?</code>&quot;
  I've searched for this but i cant find this kind of issues on my internet. Someone help me how to successfully go into &quot;<code>https://localhost/index/&lt;inputs&gt;</code>&quot;. Thank you,</p>