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.
When you coding for dynamic website, you may need to know screen resolution of the client's machine. How can you get it?
Paging is one of the essential feature for data driven website to implement. Whenever user search in the site, there may be thousands of results for the keyword what he/she search. Of course, you could show all results on one page. But it will slow down the loading of your page and user may leave your page. So it is better to split the records into pages with a certain number of records per page.