2 * Copyright (c) 2003 World Wide Web Consortium,
3 * (Massachusetts Institute of Technology, Institut National de
4 * Recherche en Informatique et en Automatique, Keio University). All
5 * Rights Reserved. This program is distributed under the W3C's Software
6 * Intellectual Property License. This program is distributed in the
7 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
13 package org.w3c.dom.html2;
16 * A selectable choice. See the OPTION element definition in HTML 4.01.
17 * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
19 public interface HTMLOptionElement extends HTMLElement {
21 * Returns the <code>FORM</code> element containing this control. Returns
22 * <code>null</code> if this control is not within the context of a
25 public HTMLFormElement getForm();
28 * Represents the value of the HTML selected attribute. The value of this
29 * attribute does not change if the state of the corresponding form
30 * control, in an interactive user agent, changes. See the selected
31 * attribute definition in HTML 4.01.
32 * @version DOM Level 2
34 public boolean getDefaultSelected();
36 * Represents the value of the HTML selected attribute. The value of this
37 * attribute does not change if the state of the corresponding form
38 * control, in an interactive user agent, changes. See the selected
39 * attribute definition in HTML 4.01.
40 * @version DOM Level 2
42 public void setDefaultSelected(boolean defaultSelected);
45 * The text contained within the option element.
47 public String getText();
50 * The index of this <code>OPTION</code> in its parent <code>SELECT</code>
52 * @version DOM Level 2
54 public int getIndex();
57 * The control is unavailable in this context. See the disabled attribute
58 * definition in HTML 4.01.
60 public boolean getDisabled();
62 * The control is unavailable in this context. See the disabled attribute
63 * definition in HTML 4.01.
65 public void setDisabled(boolean disabled);
68 * Option label for use in hierarchical menus. See the label attribute
69 * definition in HTML 4.01.
71 public String getLabel();
73 * Option label for use in hierarchical menus. See the label attribute
74 * definition in HTML 4.01.
76 public void setLabel(String label);
79 * Represents the current state of the corresponding form control, in an
80 * interactive user agent. Changing this attribute changes the state of
81 * the form control, but does not change the value of the HTML selected
82 * attribute of the element.
84 public boolean getSelected();
86 * Represents the current state of the corresponding form control, in an
87 * interactive user agent. Changing this attribute changes the state of
88 * the form control, but does not change the value of the HTML selected
89 * attribute of the element.
91 public void setSelected(boolean selected);
94 * The current form control value. See the value attribute definition in
97 public String getValue();
99 * The current form control value. See the value attribute definition in
102 public void setValue(String value);