Name
Input: an input element in an HTML form — DOM Level 2 HTML: Node → Element → HTMLElement → Input
Properties
-
String accept When
typeis “file”, this property is a comma-separated list of MIME types that specify the types of files that may be uploaded. Mirrors theacceptattribute.-
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
accesskeyattribute.-
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
alignattribute.-
String alt Alternate text to be displayed by browsers that cannot render this input element. Particularly useful when
typeis “image”. Mirrors thealtattribute.-
boolean checked When
typeis “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 thecheckedattribute.-
boolean defaultChecked When
typeis “radio” or “checkbox”, this property holds the initial value of thecheckedattribute as it appears in the document source. When the form is reset, thecheckedproperty is restored to the value of this property. Changing the value of this property changes the value of thecheckedproperty and the current checked state of the element.-
String defaultValue When
typeis “text”, “password”, or “file”, this property holds the initial value displayed by ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access