Input Number formProperty
Examples
Return the id of the form to which the <input type="number"> element belongs:
var x = document.getElementById("myNumber").form.id;
xThe output result is:myForm
Try it »
Definition and Usage
The form property returns a reference to the form containing the number field.
On success, this property returns the form object.
Note:This property is read-only.
Browser Support
![]()
![]()
![]()
![]()
![]()
All mainstream browsers support the form property.
Note:Internet Explorer 9 and earlier IE versions do not support <input> elements with the type="number" attribute.
Syntax
numberObject.form
Technical Details
| Return value: | A reference to the form element containing the number field. Returns null if the number field is not in a form. |
|---|
Input Number Object Other Extensions