OPTION XHTML Element
The OPTION element denotes one choice in a SELECT element. This element does not require a closing tag.
Using this Element
There are some common properties and collections that apply to all the elements of the document object model, see Common Properties for All DOM Elements in Internet Explorer Mobile.
This element can be used within a web page with attributes.
This element can be used within scripts where it will have properties, events and methods.
Attributes
Attribute | Value | PPC | SP | Description |
---|---|---|---|---|
CLASS | Yes | Yes | Associates the element with a CSS style.
Note Supported only for devices running Windows Mobile 2003 software or later. |
|
ID | Yes | Yes | Uniquely identifies the element within a document.
Note Supported only for devices running Windows Mobile 2003 software or later. |
|
SELECTED | Yes | Yes | Specifies that the option is the selected | |
STYLE | Yes | Yes | Provides the definition of the CSS styles used for this element.
Note Supported only for devices running Windows Mobile 2003 software or later. |
|
VALUE | String | Yes | Yes | Specifies the value of the option. This value is submitted if the option is selected. |
Scripting Properties
Property | Type | Access | Comments |
---|---|---|---|
defaultSelected | boolean | Read/Write | Read only property which retrieves whether the option is selected by default (via the presence of the SELECTED attribute in the OPTION tag). The only possible values are true and false. |
disabled | Read/Write | ||
form | Read/Write | ||
index | long | Read/Write | Read only property which retrieves the zero-based index of the OPTION in the options collection of the SELECT. |
label | Read/Write | ||
selected | boolean | Read/Write | Read/write property that sets or retrieves whether the OPTION is selected. The only possible values are true and false. |
text | string | Read/Write | Read/write property which sets or retrieves the text string specified by the OPTION tag. |
value | string | Read/Write | Read/write property which sets or retrieves the value of the OPTION. |
Scripting Events
This element has no associated events.
Scripting Methods
This property has no associated methods.
Requirements
Pocket PC: Windows Mobile 5.0 and later
Smartphone: Windows Mobile 5.0 and later
OS Versions: Windows CE 5.01 and later
See Also
Send Feedback on this topic to the authors