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