HTML DOM Time Object
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1422003450156-2'); });
HTML DOM Time Object
❮ Previous
Next ❯
Time Object
The Time Object is new in HTML5.
The Time object represents an HTML <time> element.
Access a Time Object
You can access a <time> element by using getElementById():
Example
var x = document.getElementById("myTime");
Try it Yourself »
Create a Time Object
You can create a <time> element by using the document.createElement() method:
Example
var x = document.createElement("TIME");
Try it Yourself »
Time Object Properties
Property | Description |
---|---|
dateTime | Sets or returns the value of the datetime attribute in a <time> element |
Standard Properties and Events
The Time object also supports the standard properties and events.
Related Pages
HTML reference: HTML <time> tag
❮ Previous
Next ❯