Easy Tutorial
❮ Met Document Createcomment Prop Form Name ❯

HTML DOM Input Time Object


Input Time Object

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

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

Accessing the Input Time Object

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

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

Creating the Input Time Object

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

Input Time Object Properties

Property Description
autocomplete Sets or returns the autocomplete attribute value of the time field
autofocus Sets or returns whether the time field should automatically get focus when the page loads
defaultValue Sets or returns the default value of the time field
disabled Sets or returns whether the time field is available
form Returns a reference to the form that contains the time field
list Returns a reference to the datalist that contains the time field
max Sets or returns the max attribute value of the time field
min Sets or returns the min attribute value of the time field
name Sets or returns the name attribute value of the time field
readOnly Sets or returns whether the time field is read-only
required Sets or returns whether the time field is required in the form
step Sets or returns the step attribute value of the time field
type Returns the form element type of the time field
value Sets or returns the value attribute value of the time field

Standard Properties and Events

The Input Time object also supports standard properties and events.


Related Articles

HTML Tutorial: HTML Forms

HTML Reference: HTML <input> Tag

HTML Reference: HTML <input> type Attribute

❮ Met Document Createcomment Prop Form Name ❯