Easy Tutorial
❮ Prop Canvas Shadowoffsetx Prop Screen Height ❯

Input Time value Attribute

Input Time Object

Example

Set the time for the time field:

document.getElementById("myTime").value = "22:53:05";

Definition and Usage

The value attribute is used to set or return the value of the value attribute of a time field.

The value attribute 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 <input> element with the type="time" attribute.


Syntax

Return the value attribute:

Set the value attribute:

Attribute Values

Value Description
hh:mm:ss.ms Describes the time for the time field. <br> <br> Breakdown: hh - hours (e.g., 22 for 10 PM)<br> mm - minutes (e.g., 30)<br> ss - seconds (e.g., 03)<br> ms - milliseconds (e.g., 20) Example: "09:55:32.55" or "22:15:35".

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;
16:32:55

Related Pages

HTML Reference: HTML <input> value Attribute


❮ Prop Canvas Shadowoffsetx Prop Screen Height ❯