<input type = "text" size = "40" style=" border-color:#000000;border-width:1px;"; id = "searchTerm"> <br><br> <input type="button" value="Google Search" style="background-color:gold; font-weight:bold; width:180;height:30"; onclick="google()"> <br><br> <script type = "text/javascript"> function google() { var input = document.getElementById("searchTerm").value; if (input.length > 2) { var googleSearch = "http://www.google.ca/search?hl=en&source=hp&q=" + input; document.location.href = googleSearch; } } </script>
var googleSearch = "http://www.google.com/search?hl=en&source=hp&as_sitesearch=www.yourdomainname.com&q=" + input;
Jump To Top of Thread