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).