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.
file: /Techref/language/java/script/definitive/refp_286.htm, 4KB, , updated: 2019/10/14 15:00, local time: 2024/11/24 15:50,
18.119.161.216:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/TECHREF/language/java/script/definitive/refp_286.htm"> [Chapter 21] Reference: Option.selected</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.