how to select element by class name queryselector in javascript code example Example: queryselector by class javascript document.querySelector(".class-name");