get element by class from an external page js code example Example: getelementbyclass var selector = document.getElementsByClassName('class-name');