Input Number form Property
Example
Return The form id to which the element belongs:
var x = document.getElementById("myNumber").form.id;
x
The output is:
myForm
Try it »
Definition and Usage
The form property returns a reference to the form that contains the number field.
On success, this attribute returns the form object.
Note: This attribute is read-only.
Browser support





All major browsers support the form attribute
Note: Internet Explorer 9 and earlier versions do not support the HTML using the type="number" attribute .
Syntax
numberObject
.form
Technical Details
| Return Value: | A reference to the form element that contains the number field. Returns null if the number field is not inside a form. |
|---|
Input Number Object