Example
Return which type of form element the number field is:
var x = document.getElementById("myNumber").type;
The result of x could be:
number
Try it Yourself »
Definition and Usage
The type property returns which type of form element the week field is.
For an input number, this property will always return "number".
Browser Support
The type property is supported in all major browsers.
Note: The <input type="number"> element is not supported in Internet Explorer 9 and earlier versions.
Syntax
numberObject.type
Technical Details
Return Value: | A String, representing the type of form element the number field is |
---|
< Input Number Object