queryselectorall all elements with class code example Example: select all elements javascript var elements = document.getElementsByTagName("*");