element: ``` var x = document.getElementById("myWeek").form.id; ``` ``` myForm ``` ---"> element: ``` var x = document.getElementById("myWeek").form.id; ``` ``` myForm ``` ---" />
Easy Tutorial
❮ Prop Nav Appversion Prop Radio Value ❯

Input Week form Attribute

Input Week Object

Example

Returns the form ID of the <input type="week"> element:

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

Definition and Usage

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

This attribute returns a form object upon success.

Note: This attribute is read-only.


Browser Support

All major browsers support the form attribute.

Note: The <input type="week"> element is not supported in Internet Explorer or Firefox.


Syntax

Technical Details

| Return Value: | A reference to the form element that contains the week field. Returns null if the week field is not in a form. | | --- | --- |

❮ Prop Nav Appversion Prop Radio Value ❯