Dom Obj Week
# HTML DOM Input Week Object
* * *
## Input Week Object
The Input Week object is new in HTML5.
The Input Week object represents an HTML `` element with the `type="week"` attribute.
**Note:** Internet Explorer or Firefox browsers do not support the HTML `` element with the `type="week"` attribute.
### Accessing an Input Week Object
You can use the `getElementById()` function to access an `` element with the `type="week"` attribute:
```javascript
var x = document.getElementById("myWeek");
(#)
**Tip:** You can also access the Input Week object through the form's (#) collection.
### Creating an Input Week Object
You can use the `document.createElement()` method to create an `` element with the `type="week"` attribute:
```javascript
var x = document.createElement("INPUT");
x.setAttribute("type", "week");
(#)
## Input Week Object Properties
| Property | Description |
| --- | --- |
| autocomplete | Sets or returns the autocomplete attribute value of the week field |
| (#) | Sets or returns whether the week field should automatically get focus when the page loads |
| defaultValue | Sets or returns the default value of the week field |
| (#) | Sets or returns whether the week field is disabled |
| (#) | Returns a reference to the form that contains the week field |
| list | Returns a reference to the datalist that contains the week field |
| max | Sets or returns the max attribute value of the week field |
| min | Sets or returns the min attribute value of the week field |
| (#) | Sets or returns the name attribute value of the week field |
| (#) | Sets or returns whether the week field is read-only |
| (#) | Sets or returns whether the week field must be filled out before submitting the form |
| step | Sets or returns the value of the step attribute of the week field |
| (#) | Returns the form element type of the week field |
| (#) | Sets or returns the value attribute value of the week field |
## Standard Properties and Events
The Input Week object also supports standard (#) and (#).
* * *
## Related Articles
HTML Tutorial: (#)
HTML Reference: [HTML `` Tag](#)
HTML Reference: [HTML `` type Attribute](#)
YouTip