This little javascript function will return an array of document elements that have the class name specified
(or false if none are found).Â
The sort of thing that comes standard with any js library but is allways handy to have around when you have to do without.
function getElsByClassName(classname){ var rv = []; var elems = document.getElementsByTagName('*') if (elems.length){ for (var x in elems ){ if (elems[x] && elems[x].className && elems[x].className == classname){ rv.push(elems[x]); } } } return rv; }