get value from class name javascript code example Example: getelementbyclass var selector = document.getElementsByClassName('class-name');