Free Google search button Javascript


This Javascript will allow your visitors to search google from your website using a simple text field and button. If they just press the search button they will simply get google.com. If they enter text they will be shown the search results from the google website.


The source code for this Google search button Javascript is below:

<script language="JavaScript" type="text/javascript">
<!--
// simple google search button by Dave Lauderdale (www.digi-dl.com)
function search_google(){ 
window.open("http://www.google.com/search?q="+document.search.query.value); 
}
//-->
</script>
<form name="search">
<input type="text" name="query" value="">
<input type="submit" value="Search Google" onClick="search_google()">
</form>