Latest web development tutorials

HTML DOM Input Week objects

Input Week Objects

Input Week object is a new HTML5.

Input Week object representation using type = "week" attribute of HTML <input> elements.

Note: Internet Explorer or Firefox browser does not support type = "week" attribute of HTML <input> elements.

Object Access Input Week

You can use getElementById () function to access using type = "week" <input> element attributes:

var x = document.getElementById ( "myWeek" ); try

Tip: You can also form elements to access the Input Week collection of objects.

Create Object Input Week

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

var x = document.createElement ( "INPUT");
x.setAttribute ( "type", "week "); try

Input Week object properties

Attributes description
autocomplete Sets or returns the week field autocomplete attribute value
autofocus Sets or returns the week field is automatically get the focus when the page loads
defaultValue Sets or returns the week field default value
disabled Sets or returns the week field is available
form Returns a reference to a form field week
list It returns the week field datalist references
max Sets or returns the week field max attribute value
min Sets or returns the week field property values ​​min
name Sets or returns the week field name attribute value
readOnly Sets or returns the week field is read-only
required Sets or returns the week field in a form if a required field
step Sets or returns the week field step property values
type Returns the week field form element type
value Sets or returns the week field value attribute value

Standard properties and events

Input Week objects also supports standard attributes and events .


related articles

HTML Tutorial: HTML Forms

HTML Reference Manual: HTML <the INPUT> tag

HTML Reference Manual: HTML <the INPUT> of the type attribute