HTML DOM Input Number type attributes
Examples
Returns the number of fields form element type:
var x = document.getElementById("myNumber").type;
x The output is:
number
try it"
Definition and Usage
type property returns the type of form field of type number.
In the input number, the property usually returns "number".
Browser Support
All major browsers support attribute type
Note: Internet Explorer 9 and earlier versions of IE do not support the use of type = "number" <input> element attributes.
grammar
numberObject .type
technical details
return value: | String representing the type of form element number field |
---|
Input Number Object