Input Time value property
Example
Set the time of the time field:
document.getElementById("myTime").value = "22:53:05";
Try it »
Definition and Usage
The value property sets or returns 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 the HTML using the type="time" attribute .
Syntax
Return the value attribute:
timeObject
.value
Set the value attribute:
timeObject
.value=
hh:mm:ss.ms
Attribute values
| Value | Description |
|---|---|
| hh:mm:ss.ms | Describes the time of the time field. |
解析:
Technical Details
| Return Value: | String, representing the time of the time field (without time zone information). |
|---|
More examples
Example
Get the time of the time field:
var x = document.getElementById("myTime").value;
x
The output is:
16:32:55
Try it »
Related pages
HTML Reference Manual: HTML value attribute
Input Time Object