document.queryselectorall class and id code example Example: queryselector var el = document.querySelector(".myclass");