getElementsByClass | JavaScriptSource

getElementsByClass

JavaScriptSource Staff Dec 30, 2005
A quick and elegant way of grabbing elements by a class name. JavaScript provides functions for obtaining elements by id, name, and tag name, but not by class. This function will do the trick!

The JavaScript Source: Snippets : getElementsByClass

Simply click inside the window below, use your cursor to highlight the script, and copy [Control]+C the script into a new file in your text editor (such as Note Pad) and save [Control+S]. The script is yours!!!


Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

(
0 comments)