jQuery *Selector

jQuery 选择器jQuery Selectors

Examples

Select all elements in the document:

$("*")

Try it »

Definition and Usage

The * selector selects all elements in the document, including html, head, and body.

If the * selector is used together with other elements, this selector selects all child elements within the specified element.

Tip:The * selector can impose a burden on the processing of some browsers.


Syntax

$("*")


实例

Try it - Examples

Select all elements within <body>
Use the * selector to select all elements within the <body> element.


jQuery 选择器jQuery Selectors

Other Extensions