Latest web development tutorials

HTML DOM Input Time Object

Input Time Object

Input Time object is a new HTML5.

Input Time object represents use type = "time" attribute of the HTML <input> elements.

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

Input Time Object Access

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

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

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

Create Input Time Object

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

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

Input Time Object Properties

Attributes description
autocomplete Sets or returns the time field autocomplete attribute value
autofocus Sets or returns whether the field is time to get the focus automatically when the page is loaded
defaultValue Sets or returns the time field default value
disabled Sets or returns the time field is available
form Returns time reference form fields
list It returns a reference to the time field datalist
max Sets or returns the time field max attribute value
min Sets or returns the property value of the time field min
name Sets or returns the time field name attribute value
readOnly Sets or returns the time the field is read-only
required Sets or returns whether the time field in the form is a required field
step Sets or returns the property value of the step time field
type Return time field form element type
value Sets or returns the time value of the property value field

Standard properties and events

Input Time Object 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