Java Reference
In-Depth Information
Property Name
Description
Introduced
size
Gets or sets the value of the
size
attribute.
Level 1
src
If
type
is
image
, this gets or sets the value of the
src
attribute.
Level 1
type
Gets the value of the
type
attribute.
Level 1
value
Gets or sets the value of the value attribute.
Level 1
Methods
Method Name
Description
Introduced
blur()
Removes keyboard focus from the element.
Level 1
click()
Simulates a mouse click for
<input/>
elements with
type
button
,
checkbox
,
radio
,
reset
, and
submit
.
Level 1
focus()
Gives keyboard focus to the element.
Level 1
select()
Selects content of
<input/>
elements with
type
text
,
password
,
and
file
.
Level 1
HTMLOptionElement
Represents the
<option/>
element.
Properties
Property Name
Description
Introduced
defaultSelected
Gets or sets the selected attribute. The value of this prop-
erty does not change as other <option/> elements in the
<select/> element are selected.
Level 1
disabled
Gets or sets the value of the disabled attribute.
Level 1
form
Gets the
HTMLFormElement
object containing the
<option/>
element. Returns
null
if the element is not
inside a form.
Level 1
index
Gets the index position of the
<option/>
element in its con-
taining
<select/>
element. Starts at
0
.
Level 1
label
Gets or sets the value of the
label
attribute.
Level 1
selected
Returns a Boolean value depending on whether or not the
<option/>
element is currently selected.
Level 1
Continued