jQuery Tutorial Tutorials - jQuery :selected selector

:selected selector

The jQuery :selected selector is used to select <option> elements that are selected.

jQuery :selected selector Syntax

$(':selected')

jQuery :selected selector Examples

In below example,Attaches a change event to the select that gets the text for each selected option and writes them in the div. It then triggers the event for the initial text draw.

Try now

Date:2019-08-19 02:14:04 From:www.Lautturi.com author:Lautturi