querySelectorAll
Summary
Returns a list of elements that match a provided selector.
Method of dom/Elementdom/Element
Syntax
var elementList = element.querySelectorAll(/* see parameter list */);
Parameters
selector
- Data-type
- String
A selector or multiple selectors (separated by commas).
Return Value
Returns an object of type DOM NodeDOM Node
A collection of DOM element nodes. The collection may be empty.
Notes
This method differs from the querySelector method by returning a collection of DOM element nodes that match the selector string, rather than only the first element found. Calling this method with an unknown selector (due to the browser not implementing it, or due to typo and such) may throw an exception.
Related specifications
- Selectors API Level 1
- Proposed Recommendation
See also
Related articles
Selectors
querySelectorAll
Related pages
- DocumentDocument
- aa
addressbbigblockQuotebodybuttoncaptioncentercitecodecolcolGroupdddfndirdivdldtemfieldSetformhnhtmliimginput type=buttoninput type=checkboxinput type=fileinput type=imageinput type=passwordinput type=radioinput type=resetinput type=submitinput type=textisIndexkbdlabellegendlilistingmarqueemenunoBRolpplainTextpressampsmallspanstrikestrongsubsup- tabletable
tBodytdtextAreatFootthtHeadtrttuulvarxmpReference- querySelectorquerySelector
IElementSelectorOther Resources- W3C Selectors APIW3C Selectors API
- W3C SelectorsW3C Selectors
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]