jQuery :selectedSelector

jQuery 选择器jQuery Selector

Example

Select the pre-selected item in the dropdown list:

$(":selected")

Try it Yourself »

Definition and Usage

The :selected selector selects pre-selected option elements.

Note:This selector does not apply to checkboxes or radio buttons. Please use the:checkedselector instead.


Syntax

$(":selected")


jQuery 选择器jQuery Selector

Other Extensions