Объект отслеживания HTML DOM
Отслеживание объекта
Объект Track представляет элемент HTML <track>.
Доступ к объекту трека
Вы можете получить доступ к элементу <track> с помощью getElementById():
var x = document.getElementById("myTrack");
Создайте объект трека
Вы можете создать элемент <track> с помощью метода document.createElement():
var x = document.createElement("TRACK");
Свойства объекта отслеживания
Property | Description |
---|---|
default | Sets or returns the default state of the track |
kind | Sets or returns the value of the kind attribute of the track |
label | Sets or returns the value of the label attribute of the track |
readyState | Returns the current state of the track resource |
src | Sets or returns the value of the src attribute of the track |
srclang | Sets or returns the value of the srclang attribute of the track |
track | Returns a TextTrack object representing the track element's text track data |
Стандартные свойства и события
Объект Track также поддерживает стандартные свойства и события .
Связанные страницы
Справочник по HTML: HTML-тег <track>