Compartir a través de


OPTION XHTML Element (Windows Embedded CE 6.0)

1/6/2010

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, Methods and Collections for the HTML Elements in Internet Explorer.

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

The following table shows items that Internet Explorer Embedded supports.

Attribute Value Description

CLASS

 

Associates the element with a CSS style.

ID

 

Uniquely identifies the element within a document.

SELECTED

 

Specifies that the option is the selected

STYLE

 

Provides the definition of the CSS styles used for this element.

VALUE

String

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

Retrieves whether the option is selected by default (by using the presence of the SELECTED attribute in the OPTION tag). The only possible values are True or False.

disabled

boolean

Read/Write

Sets or retrieves whether the OPTION should be disabled.

form

 

Read/Write

Sets or retrieves a reference to the form that contains the OPTION.

index

long

Read/Write

Sets or retrieves the zero-based index of the OPTION object in the options collection of the SELECT object.

label

 

Read/Write

Sets or retrieves a label for the OPTION object.

offsetHeight

Number

Read-only

Contains the height of the object in pixels, relative to the parent element.

offsetLeft

Number

Read-only

Contains the number of pixels from the left of the parent element.

offsetParent

String

Read-only

Contains a reference to the container object that defines the offsetTop and offsetLeft properties of the object.

offsetTop

Number

Read-only

Contains the number of pixels from the top of the parent element

offsetWidth

Number

Read-only

Contains the width of the object in pixels, relative to the parent element.

selected

boolean

Read/Write

Sets or retrieves whether the OPTION object is selected. The only possible values are True or False.

text

string

Read/Write

Sets or retrieves the text string specified by the OPTION tag.

value

string

Read/Write

Sets or retrieves the values of the OPTION tag.

Scripting Events

This element has no associated events.

Scripting Methods

This property has no associated methods.

Requirements

Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Concepts

Internet Explorer Embedded HTML Elements