HTML DOM Document querySelectorAll()
HTML DOM Document querySelectorAll() Method
The querySelectorAll() method is used to return all elements that match a CSS selector. It will return a NodeList. It will throw a SYNTAX_ERR exception if selectors are invalid.
Syntax:-
Its syntax is:- document.querySelectorAll(CSS selectors)
Return:-
Its return is:- A NodeList object with the elements that match the CSS selectors
Further Explanation:-
Parameter | Description |
CSS selectors |
Required. One or more CSS selectors. For multiple selectors, separate each selector with a comma. |