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

HTML DOM Input Date form attribute

Input Date form attribute

Input Date Object Reference Input Date Object

Example

Return the form containing the form id of the attribute:

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

x

The output is:

myForm

Try it »


Definition and Usage

The form attribute returns a reference to the form that contains the date field.

This attribute returns the form object on success.

Note: This property is read-only.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the form attribute.

**Note:** Internet Explorer or Firefox browser does not support .


Syntax

inputdateObject

.form

Technical Details

Return Value: A reference to the form element containing the date field. If the date control is not in a form, returns null.

Input Date Object Reference Input Date Object