Monday, February 2, 2009

How to add google search box to your site

First of All Google itself offer a free custom search engine. You can follow link www.google.com/searchcode.html and then create a custom search engine. You can add selected sites to search or manually add some keywords to confine searching within your defined keywords.

Alternatively, you can add following codes to add a custom search engine. Just copy and paste following codes in your hrml/javascript.

<form method="get" action="http://www.google.com/search">
<input type="text" name="q" size="25" maxlength="255" value="" />
<input type="submit" value="Arju's Search Test" /> <br />
<input type="checkbox" name="sitesearch"
value="http://arjudba.blogspot.com" checked /> Arju's Site<br />
</form>


Below is the output of this html.





Arju's Site

No comments:

Post a Comment