วัตถุติดตาม 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>