title: getting value from input field and open a new link
body: <p>im completely new to html &amp;&amp; javascript coding so now im doing my first steps and trying to write a search bar which will pass google your input text</p>
  
  <pre><code>&lt;script src="func.js"&gt;&lt;/script&gt;
    &lt;form name="googleSeach"&gt;
     &lt;p align="center"&gt;&lt;input name="searchTxt" id="searchTxt" type=search placeholder="Google Search"&gt;
     &lt;input type="submit" value="Find" onclick="test()"&gt;&lt;/p&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>and javascript</p>
  
  <pre><code>function test(){
      window.open("https://www.google.ru/webhp?newwindow=#q="+document.getElementById('searchTxt').value,"_self")
  }
  </code></pre>
  
  <p>well, thought it should work but no, it does not. What's the proble?</p>