July 1998
Intermediate to advanced
1456 pages
65h 5m
English
selected — NN 2 IE 3 DOM 1
Read/Write
Whether the list option has been selected by the user, meaning that
its value is submitted with the form. Scripts can modify the value to
select an item algorithmically. To find out which option is selected,
it is more efficient to use the select object’s
selectedIndex property, rather than looping
through all options in search of those whose selected properties are
true. The exception to this is when the SELECT
element is set to allow multiple selections, in which case you need
to cycle through them all to find the chosen items.
document.forms[0].selectList.options[3].selected = true
Boolean value: true | false.
false
Read now
Unlock full access