Object: HTMLInputElement
HTMLInputElement properties
|
Property name |
Type |
Description |
Status |
Support level |
Availability |
|---|---|---|---|---|---|
|
DOMString |
Specifies a comma-separated list of content types that this form accepts. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
DOMString |
Specifies the keypad key that gives access to the element. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
DOMString |
Specifies the vertical or horizontal alignment of the image on the page. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
DOMString |
When HTMLInputElement.type has a value of image, specifies the text that appears when an image is unavailable or cannot be displayed. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
boolean |
When true and HTMLInputElement.type has a value of checkbox or radio, indicates that the check box or radio button appears selected, and its value is included when the form is submitted. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
boolean |
When true and HTMLInputElement.type has a value of checkbox or radio, indicates that the input control is initially selected. The value of this property does not change if the state of the input control within the form changes. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
DOMString |
When HTMLInputElement.type has a value other than button, checkbox, hidden, image, reset, or submit, specifies the initial value of the form control. The value of this property does not change if the contents of the form control within the form changes. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
boolean |
When true, indicates that the form control is not available. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
Returns the parent <form> element for the form control. |
read only |
DOM 2 HTML |
4.6 or later |
||
|
Returns the associated <datalist> element containing the list of value suggestions, if one exists. If no associated <datalist> element exists, this property returns null. |
read only |
HTML 5 |
4.7.1 or later |
||
|
int |
When HTMLInputElement.type has a value of email, password, search, text, or url, specifies the maximum number of characters permitted as input into the text field. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
DOMString |
Specifies the amount of whitespace padding added to the top and bottom of the image. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
boolean |
When HTMLInputElement.type has a value of of email, password, search, text, or url and this property is true, indicates that the form control cannot be modified by a user. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
int |
Specifies the size of the form control. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
DOMString |
When HTMLInputElement.type has a value of image, specifies the URI of the source image. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
int |
Specifies the element’s position in the tabbing order. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
DOMString |
Specifies the type of form control this input element is. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
DOMString |
When HTMLInputElement.type has a value of image, specifies the client-side map to use with this image. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
DOMString |
Specifies the current value of the form control. This is the value portion of the name-value pair that is submitted with the form. |
writable |
DOM 2 HTML |
4.6 or later |
|
|
long |
Specifies the value of the element interpreted as a date. The browser represents this number as the number of milliseconds elapsed from origin (Midnight UTC, the morning of January 1, 1970). This property can be used with all date- and time-based input types, excluding the datetime-local input type. |
writable |
HTML 5 |
4.7.1 or later |
|
|
float |
Specifies the value of the element interpreted as a number. This property can be used with the number and range input types. |
writable |
HTML 5 |
4.7.1 or later |