Creates input controls that can be defined by the type attribute. For example, input type=file, input type=password, input type=text, or input type=tel fields.
![]() ![]() |
HTML information
| Closing Tag | required |
|---|---|
| CSS Display | inline |
| HTML Element Categories | flow phrasing interactive |
DOM Information
Inheritance Hierarchy
Members
The HTMLInputElement object has these types of members:
Properties
The HTMLInputElement object has these properties.
| Property | Description |
|---|---|
|
Sets or retrieves a comma-separated list of content types. | |
|
Sets or retrieves a text alternative to the graphic. | |
|
Specifies one or more shorthand values that define all animation properties (except animation-play-state) for a set of corresponding object properties identified in the CSS @keyframes at-rule specified by the animations-name property. | |
|
Specifies the offset within an animation cycle (the amount of time from the start of a cycle) before the animation is displayed for a set of corresponding object properties identified in the CSS @keyframes at-rule specified by the animation-name property. | |
|
Specifies the direction of play for an animation cycle. | |
|
Specifies the length of time to complete one cycle of the animation. | |
|
Specifies whether the effects of an animation are visible before or after it plays. | |
|
Specifies the number of times an animation cycle is played. | |
|
Identifies one or more animation names. An animation name selects a CSS @keyframes at-rule. | |
|
Specifies whether an animation is playing or paused. | |
|
Specifies the intermediate property values to be used during a single cycle of an animation on a set of corresponding object properties identified in the CSS @keyframes at-rule specified by the animation-name property. | |
|
Gets or sets a value that specifies whether the back face (reverse side) of an object is visible. | |
|
Sets or retrieves the state of the check box or radio button. | |
|
Retrieves whether the object is fully loaded. | |
|
Returns a reference to the constructor of an object. | |
|
Gets or sets a value that specifies in which column of the grid to place the object. | |
|
Gets or sets a value that specifies the horizontal alignment of the object within the grid column. | |
|
Gets or sets one or more values that specify the width of each grid column within the object. | |
|
Gets or sets a value that specifies the number of columns of the grid that the object spans. | |
|
Gets or sets a value that specifies in which row of the grid to place the object. | |
|
Gets or sets a value that specifies the vertical alignment of the object within the grid row. | |
|
Gets or sets one or more values that specify the height of each grid row within the object. | |
|
Gets or sets a value that specifies the number of rows of the grid that the object spans. | |
|
Gets or sets a value that represents the perspective from which all child elements of the object are viewed. | |
|
Gets or sets one or two values that represent the origin (the vanishing point for the 3-D space) of an object with an perspective property declaration. | |
|
Sets or retrieves when a video clip file should begin playing. | |
|
Gets or sets a value that specifies how child elements of the object are rendered in 3-D space. | |
|
Gets or sets one or more shorthand values that specify the transition properties for a set of corresponding object properties identified in the transition-property property. | |
|
Gets or sets one or more values that specify the offset within a transition (the amount of time from the start of a transition) before the transition is displayed for a set of corresponding object properties identified in the transition property. | |
|
Gets or sets one or more values that specify the durations of transitions on a set of corresponding object properties identified in the transition-property property. | |
|
Gets or sets a value that identifies the CSS property name or names to which the transition effect (defined by the transition-duration, transition-timing-function, and transition-delay properties) is applied when a new property value is specified. | |
|
Gets or sets one or more values that specify the intermediate property values to be used during a transition on a set of corresponding object properties identified in the transition-property property. | |
|
Sets or retrieves the displayed value for the control object. This value is returned to the server when the control object is submitted. |
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML
- Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5
Remarks
Note For code samples, see Form controls part 1 and Form controls part 2: validation on the a Windows Store app using JavaScript sample site.
Examples
This example uses the input element to create different types of input controls.
<form action="http://intranet/survey" method=post> <p>Name</p> <br><input name="control1" type=text value="Your Name"> <P>Password</P> <br><input type="password" name="control2"> <p>Color</p> <br><input type="radio" name="control3" value="0" checked>Red <input type="radio" name="control3" value="1">Green <input type="radio" name="control3" value="2">Blue <p>Comments</p> <br><input type="text" name="control4" size="20,5" maxlength="250"> <p><input name="control5" type=checkbox checked>Send receipt</p> <p><input type="submit" value="OK"><input type="reset" value="reset"></p> </form>
See also
Build date: 11/28/2012

