Input Month formProperty
Examples
Return the id of the form to which the <input type="month"> element belongs:
var x = document.getElementById("myMonth").form.id;
xThe output result is:myForm
Try it Yourself »
Definition and Usage
The form property returns a reference to the form containing the month field.
On success, this property returns the form object.
Note:This property is read-only.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the form property.
Note:Internet Explorer or Firefox browsers do not support the <input> element with the type="month" attribute.
Syntax
monthObject.form
Technical Details
| Return value: | A reference to the form element containing the month field. If the month field is not in a form, returns null. |
|---|
Input Month Object Other Extensions