Name
Input: an input element in an HTML form — DOM Level 2 HTML: Node → Element → HTMLElement → Input
Properties
-
String accept
When
type
is “file”, this property is a comma-separated list of MIME types that specify the types of files that may be uploaded. Mirrors theaccept
attribute.-
String accessKey
The keyboard shortcut (which must be a single character) a browser can use to transfer keyboard focus to this input element. Mirrors the
accesskey
attribute.-
deprecated String align
The vertical alignment of this element with respect to the surrounding text, or the left or right float for the element. Mirrors the
align
attribute.-
String alt
Alternate text to be displayed by browsers that cannot render this input element. Particularly useful when
type
is “image”. Mirrors thealt
attribute.-
boolean checked
When
type
is “radio” or “checkbox”, this property specifies whether the element is “checked” or not. Setting this property changes the visual appearance of the input element. Mirrors thechecked
attribute.-
boolean defaultChecked
When
type
is “radio” or “checkbox”, this property holds the initial value of thechecked
attribute as it appears in the document source. When the form is reset, thechecked
property is restored to the value of this property. Changing the value of this property changes the value of thechecked
property and the current checked state of the element.-
String defaultValue
When
type
is “text”, “password”, or “file”, this property holds the initial value displayed by ...
Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.