javascript element by class

JavaScript
var elementsArray = document.getElementsByClassName("someclassname");
Source

Also in JavaScript: