Input Time valueProperty
Example
Set the time of the time field:
document.getElementById("myTime").value = "22:53:05";
Try it Yourself »
Definition and Usage
The value property is used to set or return the value of the value attribute of the time field.
The value property describes the time value of the time field.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the value attribute.
Note:Internet Explorer or Firefox browsers do not support HTML <input> elements with the type="time" attribute.
Syntax
Return the value attribute:
timeObject.value
Set the value attribute:
timeObject.value=hh:mm:ss.ms
Property Value
| Value | Description |
|---|---|
| hh:mm:ss.ms | Describes the time of the time field. Parsing:
|
Technical Details
| Return Value: | String, representing the time of the time field (without timezone information). |
|---|
More Examples
Example
Get the time of the time field:
var x =
document.getElementById("myTime").value;
xThe output result is:16:32:55
Try it Yourself »
Related Pages
HTML Reference Manual:HTML <input> value attribute
Input Time Object Other Extensions