我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译
您也可以阅读此文章的English (US)版。

The HTMLTimeElement interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <time> elements.

Properties

Inherits properties from its parent, HTMLElement.

HTMLTimeElement.dateTime
Is a DOMString that reflects the datetime HTML attribute, containing a machine-readable form of the element's date and time value.

Methods

No specific method; inherits methods from its parent, HTMLElement.

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'HTMLTimeElement' in that specification.
Living Standard  
HTML 5.1
The definition of 'HTMLTimeElement' in that specification.
Recommendation No change from HTML5.
HTML5
The definition of 'HTMLTimeElement' in that specification.
Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 62Edge Full support YesFirefox Full support 22IE No support NoOpera Full support 49
Full support 49
No support 11.5 — 15
Safari No support NoWebView Android Full support 62Chrome Android Full support 62Edge Mobile Full support YesFirefox Android Full support 22Opera Android Full support 49
Full support 49
No support 11.5 — 14
Safari iOS No support NoSamsung Internet Android ?
dateTimeChrome Full support 62Edge Full support YesFirefox Full support 22IE No support NoOpera Full support 49
Full support 49
No support 11.5 — 15
Safari No support NoWebView Android Full support 62Chrome Android Full support 62Edge Mobile Full support YesFirefox Android Full support 22Opera Android Full support 49
Full support 49
No support 11.5 — 14
Safari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also

  • The HTML element implementing this interface: <time>.

文档标签和贡献者

最后编辑者: sideshowbarker,