Name

SELECTED — NN all IE all HTML all

Synopsis

SELECTED

Optional

The presence of the SELECTED attribute preselects the item within the SELECT element. When the SELECT element is set to MULTIPLE, more than one OPTION element may have the SELECTED attribute set.

Example

<OPTION VALUE="met101" SELECTED> Meteorology 101

Value

The presence of this attribute sets its value to true.

Default

false

Object Model Reference

NN

[window.]document.formName.selectName.optionName.selected

[window.]document.forms[i].elements[i].selected

IE

[window.]document.formName.selectName.optionName.selected

[window.]document.forms[i].elements[i].selected

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.