Latest web development tutorials

HTML DOM Input Time value Properties

Input Time Object Reference Input Time Object

Examples

Set Time time field:

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

try it"

Definition and Usage

value attribute is used to set the property value or return value time field.

value attribute describes the time value of the time field.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support attribute value.

Note: Internet Explorer or Firefox browser does not support type = "time" attribute of the HTML <input> elements.


grammar

Returns the value property:

timeObject .value

Set the value property:

timeObject .value = hh: mm: ss.ms

Property Value

value description
hh: mm: ss.ms It describes the time time fields.

Resolution:
  • hh - hours (for example: 22 to 22:00)
  • mm - min (example: 30)
  • ss - seconds (example: 03)
  • ms - millisecond (example: 20)
Example: "09: 55: 32.55" or "22:15:35."

technical details

return value: String representing the time (no time zone information) time fields.


More examples

Examples

Get Time time field:

var x = document.getElementById ( "myTime") value.;
x The output is:
16:32:55

try it"


Related Pages

HTML Reference Manual: HTML <the INPUT> value The property


Input Time Object Reference Input Time Object