This is one of the useful function in my code bank. This function can be used to find the elements by css class name. If you don't use jQuery, it will be definitely helpful for you.
To get current domain name of the page.
When textbox is empty, it show the watermarked text. When it get focus the watermarked text disappears. When it lost focus the watermarked text appears if there is no text.
Easiest way to retrieve all the input elements within a page.
This script highlight/select all text of textarea or text field when on click.
Cookie is a small text file that's stored in user's browser. They're mostly used for storing user preferences. It save the data with name-value pair format. Following function can be used to create and retrieve cookie values.