Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input Month form Property

Input Month form Property

Input Month Object Reference Input Month Object

Example

Return The form id to which the element belongs:

var x = document.getElementById("myMonth").form.id;

x

The output is:

myForm

Try it »


Definition and Usage

The form property returns a reference to the form that contains the month field.

On success, this attribute returns the form object.

Note: This attribute is read-only.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the form attribute

**Note:** Internet Explorer or Firefox browsers do not support the HTML using 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 Reference Input Month Object