Corporate Trainer | Designer | Developer

Corporate Trainer | Designer | Developer

Monday, March 7, 2011

Add Google search field in your site

Today I am discussing how to add Google search box to your site page, so you can allow your site visitor to search some content within your site

Add div section to you page using the div tag.

Step 2.
Add form element inside the div with method attribute set to GET and action attribute set to “”.

Add input field with type “text” with id attribute set to “query”.
Add input type with type “submit”
Add an input field with type “hidden” with name attribute set to “sitesearch” and value attribute set to your site URL.
Save and test your page by entering some keyword for searching. Enjoy…

No comments:

Post a Comment