Name

OPTION — NN 2 IE 3 DOM 1

Synopsis

The OPTION object reflects the OPTION element, which must be nested inside a SELECT element. References to OPTION objects most often use its parent SELECT object, with the OPTION object treated as one member of an array of options belonging to that SELECT object.

HTML Equivalent

<OPTION>

Object Model Reference

NN

[window.]document. formName . selectName .options[i]

[window.]document.forms[i].elements[i].options[i]

IE

[window.]document. formName .selectName.options[i]

[window.]document.forms[i].elements[i].options[i]

[window.]document.all. elementID

Properties

className

index

offsetParent

parentTextEdit

tagName

document

isTextEdit

offsetWidth

selected

text

defaultSelected

language

parentElement

style

value

id

offsetHeight

   

Methods

contains( )

removeAttribute( )

setAttribute( )

getAttribute( )

scrollIntoView( )

 

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.