THE WORLD'S LARGEST WEB DEVELOPER SITE

jQuery :selected Selector

jQuery Selectors jQuery Selectors

Example

Select the pre-selected item(s) in a drop-down list:

$(":selected")

Try it yourself »

Definition and Usage

The :selected selector selects option elements that are pre-selected.

Note: This selector will not work on checkboxes or radio buttons. Use the :checked selector instead.


Syntax

$(":selected")

jQuery Selectors jQuery Selectors


COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: