September 8, 2014 at 6:26 pm #182297
document.getElementByClass, but there is
document.getElementsByClassName, which does what you describe.*
* nb; in contrast to
getElementsByClassName returns a list of elements (since there might be any number of elements with the specified class name —hence the plural form).