In this article I am trying to explain how to implement simple Google search on HTML page.
The fundamental method involved here is to be able to manipulate the variables handed to the Google search engine, this variable called sitesearch. If you set it to a null in the sitesearch variable then you able to search the entire World Wide Web, but if you set it to a specific domain and it's forced exactly as if you had typed in the Google special notation.
Below is the code for implement simple Google search:-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form method="get" action="http://www.google.com/search">
<input type="text" name="q" size="40" maxlength="255" value="" />
<input type="submit" value="Google Search" />
<input type="radio" name="sitesearch" value="" />
<input type="radio" name="sitesearch" value="mindstick.com" checked />
Search from MindStick®<br />
In above image I type "Ajax" and click on the Google Search if you select the "Search from MindStick" radio button then it will search only from the "www.mindstick.com" website. But if I select "The Web" then search the Ajax content form www (World Wide Web).
After clicking the Google Search button:-