getElementsByClassName, w3schools.com code example Example: getelementbyclass var selector = document.getElementsByClassName('class-name');