Input Time typeAttribute
Example
Return the form element type of the time field:
var x = document.getElementById("myTime").type;
xThe output value is:
time
Try it Yourself »
Definition and Usage
The type attribute returns the form element type of the time field.
Note:In the above example, Opera, Chrome, and Safari browsers return "time", while Internet Explorer and Firefox browsers return "text".
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the type attribute
Note:Internet Explorer and Firefox browsers do not support HTML <input> elements with type="time" attribute.
Syntax
timeObject.type
Technical Details
| Return value: | A string representing the form element type of the time field. |
|---|
Input Time Object Other Extensions