HTMLInputElement : HTMLElement

Input element on an HTML Form.

Browser/User Agent Support

IEMozillaNetscapeOperaSafariNetscapte
4.0+1.0+3.0+7.0+1.0+no

Constructors

ConstructorIEMozillaNetscapeOperaSafariNetscapte
Input element on an HTML Form
4.0+1.0+3.0+7.0+1.0+no
 

Properties

PropertyIEMozillaNetscapeOperaSafariNetscapte
MIME Types accepted in a FileUpload element on the Form.
5.0+nonononono
 
Hot-key shortcut for the element.
4.0+nonononono
 
Defines the alignment of the element.
4.0+nonononono
 
Specifies alternative text to display if the element cannot be displayed as expected.
4.0+1.0+6.0+7.0+1.0+no
 
Specifies whether form autocompletion, which automatically completes the fields on a form after the user has typed enough letters, is on or off.
5.0+nonononono
 
Specifies whether or not the element is checked.
3.0+1.0+2.0+7.0+1.0+no
 
Field from a data source that is bound to the element.
4.0+nonononono
 
Specifies how to format the element data.
4.0+nonononono
 
Data source that is bound to the element.
4.0+nonononono
 
If true, specifies that the element should be checked by default.
3.0+1.0+2.0+7.0+1.0+no
 
Initial value for the element.
3.0+1.0+2.0+7.0+1.0+no
 
If true, indicates that the element is disabled.
4.0+1.0+6.0+7.0+1.0+no
 
The form that contains this element.
3.0+1.0+2.0+7.0+1.0+no
 
Height (in pixels) of the element.
4.0+1.0+4.0+7.0+1.0+no
 
Maximum number of characters that a user may type into the element.
4.0+1.0+6.0+7.0+1.0+no
 
Unique name of the element.
3.0+1.0+2.0+7.0+1.0+no
 
If true, indicates that the user cannot enter text into or change the element.
4.0+1.0+6.0+7.0+1.0+no
 
Number of characters that the field visibly holds.
4.0+1.0+6.0+7.0+1.0+no
 
URL for an image for the element.
3.0+1.0+2.0+7.0+1.0+no
 
If true, indicates that the element is currently selected.
3.0+1.0+2.0+7.0+1.0+no
 
Position of the element in the tabbing order for the document.
4.0+1.0+6.0+7.0+1.0+no
 
Type of input element.
4.0+1.0+3.0+7.0+1.0+no
 
Specifies a URL to use for an image map or object map.
4.0+1.0+6.0+7.0+1.0+no
 
Value for the element that is sent to the server when the form is submitted.
4.0+1.0+3.0+7.0+1.0+no
 
Vcard name from the profile of the user.
4.0+nonononono
 
Width (in pixels) of the element.
4.0+1.0+4.0+7.0+1.0+no
 

Methods

MethodIEMozillaNetscapeOperaSafariNetscapte
Removes focus from the element.
3.0+1.0+2.0+7.0+1.0+no
 
For clickable elements, simulates a mouse click on the element.
4.0+1.0+2.0+7.0+1.0+no
 
Creates a new textRange object.
4.0+nonononono
 
Places focus on the element.
3.0+1.0+2.0+7.0+1.0+no
 
Process the instance of the event.
nono4.0+nonono
 
For elements containing text, selects the element text.
3.0+1.0+2.0+7.0+1.0+no
 

References

HTMLFormElement | HTMLOptionElement | HTMLSelectElement | HTMLTextAreaElement | Input | Button | Checkbox | FileUpload | Hidden | Password | Radio | Reset | Submit | Text

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Constructor Detail

HTMLInputElement HTMLInputElement()

Input element on an HTML Form

Visibility
internal

Property Detail

String accept

MIME Types accepted in a FileUpload element on the Form.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String accessKey

Hot-key shortcut for the element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String align

Defines the alignment of the element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String alt

Specifies alternative text to display if the element cannot be displayed as expected.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String autocomplete

Specifies whether form autocompletion, which automatically completes the fields on a form after the user has typed enough letters, is on or off.

Boolean checked

Specifies whether or not the element is checked.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String dataFld

Field from a data source that is bound to the element.

String dataFormatAs

Specifies how to format the element data.

String dataSrc

Data source that is bound to the element.

Boolean defaultChecked

If true, specifies that the element should be checked by default.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String defaultValue

Initial value for the element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Boolean disabled

If true, indicates that the element is disabled.

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/stylesheets.html

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

HTMLFormElement form - read only

The form that contains this element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Number height - read only

Height (in pixels) of the element.

Number maxLength

Maximum number of characters that a user may type into the element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String name

Unique name of the element.

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/attributes.html

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Boolean readOnly

If true, indicates that the user cannot enter text into or change the element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String size

Number of characters that the field visibly holds.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String src

URL for an image for the element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Boolean status - read only

If true, indicates that the element is currently selected.

Number tabIndex

Position of the element in the tabbing order for the document.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String type

Type of input element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String useMap

Specifies a URL to use for an image map or object map.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String value

Value for the element that is sent to the server when the form is submitted.

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/attributes.html

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String vcard_name

Vcard name from the profile of the user.

Number width

Width (in pixels) of the element.

Method Detail

blur() : void

Removes focus from the element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

click() : void

For clickable elements, simulates a mouse click on the element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

createTextRange() : textRange

Creates a new textRange object.

See Also

String

focus() : void

Places focus on the element.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

handleEvent(Event event) : 

Process the instance of the event.

EventeventType of event.

select() : void

For elements containing text, selects the element text.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C