Availability
DOM Level 1 HTML
Inherits from/Overrides
Node
Properties
boolean defaultSelected
The
initial value of the selected attribute of the
<option> element. If the form is reset, the
selected property is reset to the value of this
property. Setting this property also sets the value of the
selected property.
boolean disabled
If
true, this option is disabled and the user is not
allowed to select it. Mirrors the disabled
attribute.
readonly HTMLFormElement form
A reference to
the <form> element that contains this
element.
readonly long index
The position
of this <option> element within the
<select> element that contains it.
String label
The text to
be displayed for the option. Mirrors the label
attribute. If this property is not specified, the plain-text content
of the <option> element is used instead.
boolean selected
The
current state of this option: if true, the option
is selected. The initial value of this property comes from the
selected attribute.
readonly String text
The plain text
contained within the <option> element. This
text appears as the label for the option.
String value
The value
submitted with the form if this option is selected when form
submission occurs. Mirrors the value attribute.
Description
This interface describes an <option> element
within a <select> element.
See Also
HTMLFormElement, HTMLInputElement, HTMLSelectElement; Option and
Select objects in the client-side reference section; Chapter 15
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.