Navigator 2.0, Internet Explorer 3.0; enhanced in Navigator 3.0
select.options[i]
A read-only Boolean that specifies whether this option is selected by default. Set by the SELECTED attribute.
A read-only integer that specifies the index of this option within the array of options.
A read/write Boolean that specifies whether this option is currently selected. Its initial value is specified by the SELECTED attribute.
The text that describes the option. It is the plain text (not formatted HTML text) that follows the <OPTION> tag. In Navigator 2.0 and Internet Explorer 3.0, this property is read-only. In Navigator 3.0 it is read/write.
A read/write string that specifies the value to be passed to the server if this option is selected when the form is submitted. The initial value is specified by the VALUE attribute.
new Option([text, [value, [defaultSelected, [selected]]]])
An optional string argument that specifies the text property of the Option object.
An optional string argument that specifies the value property of the Option object.
An optional Boolean argument that specifies the defaultSelected property of the Option object.
An optional Boolean argument that specifies the selected property of the Option object.
The newly created Option object.
An Option object is created by an <OPTION> tag within a <SELECT> which is itself within a <FORM>. Multiple <OPTION> tags typically appear within the <SELECT>.
<FORM ...> <SELECT ...> <OPTION [ VALUE="value" ] the value returned when the form is submitted [ SELECTED ] > specifies whether this option is initially selected plain_text_label the text to display for this option ... </SELECT> ... </FORM>
The Option object describes a single option displayed within a Select object. The properties of this object specify whether it is selected by default, whether is is currently selected, what position it has in the options[] array of its containing Select object, what text it displays, and what value it passes to the server if it is selected when the containing form is submitted.
Note that although the text displayed by this option is specified outside of the <OPTION> tag, that text must be plain, unformatted text, without any HTML tags. This is so that the text can be properly displayed in list boxes and drop-down menus that do not support HTML formatting.
You can dynamically create new Option objects for display in a Select object with the Option() constructor. Once a new Option object is created, it can be appended to the list of options in a Select object by assigning it to the variable options[options.length]. See Select.options[] for details.
file: /Techref/language/java/script/definitive/refp_283.htm, 8KB, , updated: 2019/10/14 15:00, local time: 2024/11/15 13:40,
3.144.83.48: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://massmind.ecomorder.com/Techref/language/java/script/definitive/refp_283.htm"> [Chapter 21] Reference: Option</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to massmind.ecomorder.com! |
.