get elment by class s code example Example: getelementbyclass var selector = document.getElementsByClassName('class-name');