Obiekt czasu HTML DOM
Obiekt czasu
Obiekt Time reprezentuje element HTML <time>.
Uzyskaj dostęp do obiektu czasu
Możesz uzyskać dostęp do elementu <time> za pomocą getElementById():
Przykład
var x = document.getElementById("myTime");
Utwórz obiekt czasu
Możesz utworzyć element <time> za pomocą metody document.createElement():
Przykład
var x = document.createElement("TIME");
Właściwości obiektu czasu
Property | Description |
---|---|
dateTime | Sets or returns the value of the datetime attribute in a <time> element |
Standardowe właściwości i zdarzenia
Obiekt Time obsługuje również standardowe właściwości i zdarzenia .
Powiązane strony
Odniesienie HTML: tag HTML <czas>