HTML DOM Input Week object
Input Week object
The Input Week object represents an HTML-lt;input-gt; element that uses the type-"week" property.
Note: Internet Explorer or Firefox browsers do not support HTML and input elements that use the type-"week" property.
Access the Input Week object
You can use the getElementById() function to access the elements that use the type-"week" property:
Tip: You can also access the Input Week object through the form's collection of elements.
Create an Input Week object
You can use the document.createElement() method to create an element that uses the type-"week" property:
x.setAttribute("type", "week"); Give it a try
Input Week object properties
Property | Describe |
---|---|
autocomplete | Set or return the autocomplete property value for the week field |
autofocus | Set or return whether the week field automatically gets focus after the page is loaded |
defaultValue | Set or return the default value for the week field |
disabled | Set or return whether the week field is available |
form | Returns a form reference that uses the week field |
list | Returns a datalist reference that contains the week field |
max | Set or return the max property value of the week field |
min | Set or return the min property value of the week field |
name | Set or return the name property value of the week field |
readOnly | Set or return whether the week field is read-only |
required | Set or return whether the week field is required in the form |
step | Set or return the value of the week field step property |
type | Returns the type of form element in the week field |
value | Set or return the value property value of the week field |
Standard properties and events
Input Week objects also support standard properties and events.
Related articles
HTML tutorial: HTML forms
HTML Reference Manual: HTML slt;input.gt; Tags
HTML Reference Manual: HTML slt;input> type property