Notice:
The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

querySelectorAll

< css
Jump to: navigation, search

querySelectorAll

This article is Almost Ready.

W3C Working Draft

Summary

Returns a list of elements that match a provided selector.

Method of dom/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 Node

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

Needs Examples: This section should include examples.

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

Specification Status Related Changes
Selectors API Level 1 Proposed Recommendation Section 6.1

See also

Related articles

Selectors

  • querySelectorAll




























Related pages (MSDN)

  • Document
  • 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
  • Reference
  • querySelector
  • IElementSelector
  • Other Resources
  • W3C Selectors API
  • W3C Selectors

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]