The method getElementsByClassName() is only natively supported by Firefox 3, hence it will not work in lower versions nor Internet Explorer. There are many other alternatives.