Input Number typeProperty
Example
Return the form element type of the number field:
var x = document.getElementById("myNumber").type;
xOutput:
number
Try it Yourself »
Definition and Usage
The type property returns the form type of the number field.
In input number, this property usually returns "number".
Browser Support
![]()
![]()
![]()
![]()
![]()
All mainstream browsers support the type property.
Note:Internet Explorer 9 and earlier IE versions do not support <input> elements using the type="number" attribute.
Syntax
numberObject.type
Technical Details
| Return Value: | A string representing the form element type of the number field. |
|---|
Input Number Object Other Extensions