I'm building a website, and there is a input that allows the user to write some text and search for it on google. I have everything working already, except that the user has to click the search button to make it go to google.
I wanted to be able to press enter key and it search. Is there any way?
code:
<img id="google-logo" src="1280px-Google_2015_logo.svg.png">
<input placeholder="Pesquisar na Web" id="google-search">
<img src="search.png" id="search-img" value="Submit" onClick="javascript: window.location.replace('http://www.google.com/search?q=' + document.getElementById('google-search').value);">