Introduction:
I was wondering how I could put a search box on the web page but it is very simple.
One-way to do this is by simply using a third party search provider to do the search for you. Google and Yahoo! Do already index your content, so all you have to do is to create a form with an input field that links to a search limited to your domain.
Write the following html code on your web page to put the search button with google search:
<body bgcolor ="silver">Enter your searching text:
<form action='http://google.com/search'>
<input type="hidden" name="as_sitesearch" />
<input type="text" name="q" />
<input type="submit" name="search" value="Search" />
</form>
</body>

Figure 1:
Suppose you want to search 'Countries of the world' then enter the searching text in the given text box, And press search button. Then you can get the search result as follows:

Figure 2:
Similarly here is the same form if you want to search your page with yahoo search:
<body bgcolor ="silver"> Enter your searching text:
<form action='http://search.yahoo.com/search'>;
<input type="hidden" name="vs" />
<input type="text" name="p" />
<input type="submit" name="search" value="Search" />
</form>
</body>