Input Datetime form 屬性
定義和用法
form
屬性返回對包含日期時間字段的表單的引用。
此屬性在成功時返回表單物件。
註釋:此屬性是只讀的。
範例
返回包含 <input type="datetime"> 元素的表單的 id:
var x = document.getElementById("myDatetime").form.id;
文法
datetimeObject.form
Technical Details
Return Value: |
Reference to the form element containing the date-time field. If the date control is not in the form, it returns |
---|
Browser Support
The numbers in the table indicate the first browser version that fully supports this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |
Note:Element <input type="datetime"> does not display any date-time field/calendar in any mainstream browser except Safari.