A Better Google Site Search In HTML / Javascript

IT Support Forum Forums Development HTML, CSS & Javascript A Better Google Site Search In HTML / Javascript

This topic contains 0 replies, has 1 voice, and was last updated by  Webmaster 6 months, 1 week ago.

  • Author
    Posts
  • #2353

    Webmaster
    Keymaster

    Here’s a nice javascript / HTML based Google Search box that you can put on your website. It’s much better than Google’s site search box because it uses the full power of Google to search, instead of the cut down rubbish search that comes with Google’s search box that’s full of adverts and doesn’t return very good results.

    <script type="text/javascript">
    function google()
    {
    var str=document.getElementById('googlebox').value;
    str="http://www.google.com/search?hl=en&source=hp&q=site:itsupportforum.net " + str + "&aq=f&oq=&aqi=";
    var replaced=str.replace(" ","+");
    window.open(replaced)
    }
    </script>
    <input id="googlebox" type="text" value="Google" />
    <input type="button" value="Go" />
    

You must be logged in to reply to this topic.