select by attrribute and class js code example Example: javascript element by class var elementsArray = document.getElementsByClassName("someclassname");