querySelectorAll Method

New for Windows Internet Explorer 8

Note: This documentation is preliminary and is subject to change.

Retrieves all Document Object Model (DOM) element nodes from descendants of the starting element node that match any selector within the supplied selector strings.

Syntax

pel = object.querySelectorAll(v)

Parameters

v Required. The selector string.

Return Value

A collection of DOM element nodes. The collection may be empty.

Remarks

This method extends the querySelector method by retrieving all DOM element nodes that match the selector string, rather than only the first element. This is why the result is in the form of a collection.

The collection is ordered identically to the document search order, which is a depth-first preorder traversal.

The Remarks in querySelector apply fully to this method.

Standards Information

This method is defined in Selectors API (W3C Working Draft) World Wide Web link.

Applies To

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NOBR, OL, P, PLAINTEXT, PRE, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

W3C Selectors API World Wide Web link, W3C Selectors World Wide Web link, querySelector, IElementSelector