Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Time Object

HTML DOM Time Object


The Time object

The Time object is new in HTML5.

The Time object represents an HTML

Access the Time Object

You can use getElementById() to access it

var x = document.getElementById("myTime");

Try it

Create the Time Object

You can use the document.createElement() method to create

var x = document.createElement("TIME");

Try it

Time Object Properties

property Description
dateTime Sets or returns the

Standard properties and events

The Time object also supports standard property and Events.


Related Articles

HTML Reference Manual:HTML