Navigator 2.0, Internet Explorer 3.0
option.selected
The selected property is a read/write Boolean value that specifies whether a Option object within a Select object is currently selected. You can use this property to test whether a given option is selected. You can also use it to select (by setting it to true) or deselect (by setting it to false) a given option. Note that when you select or deselect an option in this way the Select.onchange() event handler is not invoked.
To determine the selected options in a Select object, you can loop through the Select.options[] array testing the selected property of each item. When multiple selections are not allowed (i.e., when the MULTIPLE attribute does not appear in the <SELECT> tag), however, it is much easier to simply check use the selectedIndex property of the Select object.
This HTML Help has been published using the chm2web software. |