OPTIONOPTION*
*



Contents  *



Index  *Topic Contents
*Previous Topic: OL
*Next Topic: P

OPTION

Description

Denotes one choice in a select list.

Remarks

Although OPTION elements do not appear in the all collection, you can gain access to these elements by applying the options collection to the SELECT element.

Style settings that you apply to the style object for this element are ignored. But style settings that you apply to the containing SELECT element are also applied to this element.

This element is a block element.

Example

The following JScript example displays the text for all options in the first SELECT list in the document.

var el = document.all.tags("SELECT").item(0);
if (el != null) {
    for (i=0; i<el.options.length; i++) {
        alert("Option " + i + " is " + el.options(i).text);
    }
}

Properties

className, document, id, isTextEdit, language, offsetHeight, offsetParent, offsetWidth, parentElement, parentTextEdit, selected, sourceIndex, style, tagName, text, value

Methods

contains, getAttribute, removeAttribute, scrollIntoView, setAttribute

HTML Element

OPTION

See Also

SELECT


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.