Input DatetimeLocal form attribute
Input DatetimeLocal Local object
Example
Return The form id to which the element belongs:
var x = document.getElementById("myLocalDate").form.id;
x
The output is:
myForm
Try it »
Definition and Usage
The form attribute returns a reference to the form that contains the local datetime 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 or Firefox browser does not support .
Syntax
datetimelocalObject
.form
Technical Details
| Return Value: | A reference to the form element containing the local datetime field. If the time control is not in a form, returns null. |
|---|
Input DatetimeLocal Object