Creates a single-line numeric entry control.
![]() |
DOM Information
Inheritance Hierarchy
Members
The input type=number object has these types of members:
Properties
The input type=number object has these properties.
| Property | Description |
|---|---|
|
Gets a value indicating whether the object can contain child objects. | |
|
Retrieves or initially sets the type of input control represented by the object. | |
|
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, Section 4.10.7.1.13
Remarks
The size and maxlength attributes are considered obsolete, but conform under the HTML5 specification.
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 type=number element to create an empty number control.
<input type="number" value="" name="numbox">
See also
- Reference
- input
Build date: 11/28/2012
