Input Number type Property
Example
Return the form element type of the number field:
var x = document.getElementById("myNumber").type;
x The output result is:
number
Try it »
Definition and Usage
The type property returns the form element type of the number field.
In an input number, this property usually returns "number".
Browser support





All major browsers support the type property
Note: Internet Explorer 9 and earlier versions do not support the HTML 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