Input Datetime formProperty
Examples
Returns the id of the form to which the <input type="datetime"> element belongs:
var x = document.getElementById("myDatetime").form.id;
xThe output result is:myForm
Try it Yourself »
Definition and Usage
The form property returns a reference to the form that contains the datetime field.
When successful, this property returns a form object.
Note:This property is read-only.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the form property.
Note:Internet Explorer, Firefox, Opera 15 (and later), or Chrome support <input> elements with type="datetime".
Syntax
datetimeObject.form
Technical Details
| Return Value: | A reference to the form element containing the datetime field. If the datetime field is not in a form, returns null. |
|---|
Input Datetime Object Other Extensions