1. Home
  2. Computing & Technology
  3. JavaScript
photo of Stephen Chapman
Stephen's JavaScript Blog

By Stephen Chapman, About.com Guide to JavaScript since 2004

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
Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.