getElementsByClassName
Sunday July 19, 2009
When JavaScript doesn't provide the function we need we can always add our own.
One advantage of the JavaScript language is that you can extend the language to add your own functionality. In the eight DOM tutorial we look at how we can take advantage of this to add our own method for looking up elements in the web page that share the same class name. (Since I originally wrote this DOM tutorial some browsers have now implemented a native version of this method. A more recently written Object Oriented tutorial shows you how to use the native one if it exists and add your own if it doesn't.
getElementsByClassName


No comments yet. Leave a Comment