Easy Tutorial
❮ Jsref Constructor String Jsref Toutcstring ❯

HTML DOM Input Week Object


Input Week Object

The Input Week object represents an HTML <input> element with the type="week" attribute.

Note: Internet Explorer or Firefox browsers do not support HTML <input> elements with the type="week" attribute.

Accessing an Input Week Object

You can access an <input> element with the type="week" attribute using the getElementById() function:

Tip: You can also access the Input Week object through the form's elements collection.

Creating an Input Week Object

You can create an <input> element with the type="week" attribute using the document.createElement() method:

Input Week Object Properties

Property Description
autocomplete Sets or returns the autocomplete attribute value of the week field
autofocus Sets or returns whether the week field automatically gets focus when the page loads
defaultValue Sets or returns the default value of the week field
disabled Sets or returns whether the week field is available
form 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
name Sets or returns the name attribute value of the week field
readOnly Sets or returns whether the week field is read-only
required Sets or returns whether the week field is required in the form
step Sets or returns the step attribute value of the week field
type Returns the form element type of the week field
value Sets or returns the value attribute value of the week field

Standard Attributes and Events

The Input Week object also supports standard attributes and events.


Related Articles

HTML Tutorial: HTML Forms

HTML Reference: HTML <input> Tag

HTML Reference: HTML <input> type Attribute

❮ Jsref Constructor String Jsref Toutcstring ❯