Platform Support
IE | Mozilla | Netscape | Opera | Safari | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
---|
Constructors
Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
Input Constructor() : Input
Creates a new instance of an Input object.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||
Input() : InputCreates a new instance of an Input object. Returns
|
Inherited Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
onclick
: Object
Event handler for when a user clicks on the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
ondblclick
: Object
Event handler for when a user double-clicks the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onhelp
: Object
Event handler for when a user requests Help.
|
Show Details | 3.0+ | no | no | no | no |
|
||||||
onkeydown
: Object
Event handler for when a user presses a key on his or her keyboard.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onkeypress
: Object
Event handler for when a user presses and releases a key on his or her keyboard.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onkeyup
: Object
Event handler for when a user releases a key on his or her keyboard.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmousedown
: Object
Event handler for when a user clicks the mouse button.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmousemove
: Object
Event handler for when a user moves the mouse.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseout
: Object
Event handler for when a user moves the mouse off of the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseover
: Object
Event handler for when a user moves the mouse over the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseup
: Object
Event handler for when a user releases the mouse button.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
List of all elements within the current element. Behaves similarly to document.all.
|
No Details | 4.0+ | no | no | 7.0+ | no |
|
||||||
The direct child elements of the current element.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
className
: String
The CSS class that the element belongs to.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Reference to the Document object that contains the current element.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
id
: String
Identifier used to assign a unique name to the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
HTML text that the element contains. (Does not include opening and closing tags of the element.)
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Plain text that the element contains. (Does not include opening and closing tags of the element.)
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
lang
: String
lang attribute of the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Height (in pixels) of the element and its contents.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
offsetLeft
: Object
Horizontal position (in pixels) of the element relative to the offsetParent container element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
offsetParent
: Object
Container element used as a reference for the offsetLeft and offsetTop elements.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Vertical position (in pixels) of the element relative to the offsetParent container element.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Width (in pixels) of the element and its contents.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
HTML text that the element contains, including its start and end tags.
|
No Details | 4.0+ | no | no | 7.0+ | no |
|
||||||
Plain text that the element contains, including its start and end tags.
|
No Details | 4.0+ | no | no | 7.0+ | no |
|
||||||
Element that is the direct parent of the current element.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
Index of the current element in document.all.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
Inline CSS style attributes for the element.
|
No Details | 4.0+ | 1.0+ | 4.0+ | 7.0+ | 1.0+ |
|
||||||
HTML tag name for the element.
|
No Details | 5.5+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
title
: String
Title attribute of the HTML tag for the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
name
: String
Name of the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
static onblur
: Function
Event handler for when focus is moved off the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
static onchange
: Function
Event handler for when a user changes makes a change element and moves focus off the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
static onclick
: Function
Event handler for when a user clicks on the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
static onfocus
: Function
Event handler for when a user gives focus to the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
type
: String
Type of form element the input element is.
|
Show Details | 3.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
||||||
value
: String
Value of the element when the form is submitted.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
checked
: Boolean
If the element is a radio button or checkbox, specifies whether or not the element is checked.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
defaultChecked
: Boolean
If the element is a radio button or checkbox, specifies whether or not the element is checked by default.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
defaultValue
: String
Specifies the default value for the element text.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
form
: String
Reference to the form that contains the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
Number of options in the options array for the element.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
If the element is a Select list, specifies the list of options (as an array) for the element.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
If the element is a Select list, specifies the index of the selected option in the options array.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
Inherited Functions
Method | Action | IE | Mozilla | Netscape | Opera | Safari | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
contains(Object target) : Boolean
Determines whether the current element contains the target HTML element.
|
Show Details | 4.0+ | no | no | no | no | ||||||||
Parameters
Returns
|
||||||||||||||
getAttribute(String name) : String
Gets the value of the specified attribute.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||||||||
Parameters
Returns
|
||||||||||||||
handleEvent() : Object
Calls the event handler for the specified event.
|
Show Details | no | no | 6.0+ | no | no | ||||||||
Returns
|
||||||||||||||
insertAdjacentHTML(String where, Object text) : void
Inserts HTML text in the specified location within or next to the element.
|
Show Details | 5.0+ | no | no | 7.0+ | no | ||||||||
Parameters
Returns
|
||||||||||||||
insertAdjacentText(String where, Object text) : void
Inserts plain text in the specified location within or next to the element.
|
Show Details | 5.0+ | no | no | 7.0+ | no | ||||||||
Parameters
Returns
|
||||||||||||||
removeAttribute(String name) : Attribute
Deletes the specified attribute from the element.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||||||||
Parameters
Returns
|
||||||||||||||
scrollIntoView([Boolean top]) : void
Scrolls the current document so that the top of current element is either at the top of the display area, or the bottom of
the element is at the bottom of the display area.
|
Show Details | 4.0+ | 1.0+ | 7.0+ | no | no | ||||||||
Parameters
Returns
|
||||||||||||||
setAttribute(String name, Object value) : Object
Sets the specified attribute to the specified value for the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||||||||
Parameters
Returns
|
Functions
Method | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
blur() : Object
Removes focus from the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||
Returns
|
||||||||
click() : Object
Simulates a mouse click on the element. Does not invoke the onClick event handler.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||
Returns
|
||||||||
focus() : Object
Gives focus to the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||
Returns
|
||||||||
select() : Object
Selects the text of the element, if applicable.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||
Returns
|
References
Button|Checkbox|FileUpload|Form|Hidden|Password|Radio|Reset|Select|Submit|Text|Textarea|HTMLInputElement
Availability
JavaScript 1.0|enhanced in JavaScript 1.1|HTML DOM Level 1|W3C