javascript set styling by classname code example Example: javascript element by class var elementsArray = document.getElementsByClassName("someclassname");