HTML DOM querySelectorAll() Method
HTML DOM querySelectorAll() Method
The querySelectorAll() method is used to return collection of an element child elements that matched specified CSS selector. It will return them as static NodeList object. Nodes in it can be accessed by index numbers that starts at 0. Its length property return number of nodes in list.
Syntax:-
Its syntax is:- element.querySelectorAll(CSS selectors)
Return:-
Its return is:- A NodeList object having all descendant elements of current matched element
Further Explanation:-
Parameter | Description |
---|---|
CSS selectors | Required. Specifies one or more CSS selectors to match the element. |