HTML DOM Input Number value property
Definition and Usage
property value or return value is used to set the property value number field.
value attribute describes the number you input.
Browser Support
All major browsers support attribute value.
Note: Internet Explorer 9 and earlier versions of IE do not support the use of type = "number" <input> element attributes.
grammar
Returns the value property:
numberObject .value
Set the value property:
numberObject .value = number
Property Value
value | description |
---|---|
number | It describes the initialization number field (default) values. |
technical details
return value: | String represents a number |
---|
More examples
Examples
Get numeric number field:
var x = document.getElementById ( "myNumber") value.;
x The output is: 2
try it"
Related Pages
HTML Reference Manual: HTML <the INPUT> value The property
Input Number Object