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