org.w3c.dom.html.HTMLSelectElement Maven / Gradle / Ivy
// Copyright (c) 1998 by W3C
//
// DOM is a trademark of W3C
// The DOM level 1 specification, from which this
// source is derived, is copyright by W3C.
// See: http://www.w3.org/TR/REC-DOM-Level-1/
//
package org.w3c.dom.html;
import org.w3c.dom.*;
/**
The select element allows the selection of an option. The contained options can be directly accessed through the select element as a collection. See the
SELECT element definition
in HTML 4.0.
Property Summary
type
getType
The type of control created.
selectedIndex
getSelectedIndex
setSelectedIndex
The ordinal index of the selected option. The value -1 is returned if no element is selected. If multiple options are selected, the index of the first selected option is returned.
value
getValue
setValue
The current form control value.
length
getLength
The number of options in this
SELECT
.
form
getForm
Returns the
FORM
element containing this control. Returns null if this control is not within the context of a form.
options
getOptions
The collection of
OPTION
elements contained by this element.
disabled
getDisabled
setDisabled
The control is unavailable in this context. See the
disabled attribute definition
in HTML 4.0.
multiple
getMultiple
setMultiple
If true, multiple
OPTION
elements may be selected in this
SELECT
. See the
multiple attribute definition
in HTML 4.0.
name
getName
setName
Form control or object name when submitted with a form. See the
name attribute definition
in HTML 4.0.
size
getSize
setSize
Number of visible rows. See the
size attribute definition
in HTML 4.0.
tabIndex
getTabIndex
setTabIndex
Index that represents the element's position in the tabbing order. See the
tabindex attribute definition
in HTML 4.0.
*/
public interface HTMLSelectElement
extends HTMLElement
{
/**
* Returns the value of the type
property.
*/
String getType ();
/** Assigns the value of the selectedIndex
property.
*/
void setSelectedIndex (int selectedIndex);
/**
* Returns the value of the selectedIndex
property.
*/
int getSelectedIndex ();
/** Assigns the value of the value
property.
*/
void setValue (String value);
/**
* Returns the value of the value
property.
*/
String getValue ();
/**
* Returns the value of the length
property.
*/
int getLength ();
/**
* Returns the value of the form
property.
*/
HTMLFormElement getForm ();
/**
* Returns the value of the options
property.
*/
HTMLCollection getOptions ();
/** Assigns the value of the disabled
property.
*/
void setDisabled (boolean disabled);
/**
* Returns the value of the disabled
property.
*/
boolean getDisabled ();
/** Assigns the value of the multiple
property.
*/
void setMultiple (boolean multiple);
/**
* Returns the value of the multiple
property.
*/
boolean getMultiple ();
/** Assigns the value of the name
property.
*/
void setName (String name);
/**
* Returns the value of the name
property.
*/
String getName ();
/** Assigns the value of the size
property.
*/
void setSize (int size);
/**
* Returns the value of the size
property.
*/
int getSize ();
/** Assigns the value of the tabIndex
property.
*/
void setTabIndex (int tabIndex);
/**
* Returns the value of the tabIndex
property.
*/
int getTabIndex ();
/**
Add a new element to the collection of
OPTION
elements for this
SELECT
.
@param element
The element to add.
@param before
The element to insert before, or NULL for the head of the list.
*/
void add (HTMLElement element, HTMLElement before);
/**
Remove an element from the collection of
OPTION
elements for this
SELECT
. Does nothing if no element has the given index.
@param index
The index of the item to remove.
*/
void remove (int index);
/**
Removes keyboard focus from this element.
*/
void blur ();
/**
Gives keyboard focus to this element.
*/
void focus ();
}