select all elements of class javascript code example Example: javascript get all elements by class starting with document.querySelectorAll("[class^=page]")