วัตถุความคืบหน้า HTML DOM
วัตถุความคืบหน้า
วัตถุ Progress แสดงถึงองค์ประกอบ HTML <progress>
<progress> องค์ประกอบแสดงถึงความคืบหน้าของงาน
เข้าถึงวัตถุความคืบหน้า
คุณสามารถเข้าถึง <progress> องค์ประกอบโดยใช้ getElementById():
ตัวอย่าง
var x = document.getElementById("myProgress");
สร้างวัตถุความคืบหน้า
คุณสามารถสร้าง <progress> องค์ประกอบโดยใช้ document.createElement() วิธีการ:
ตัวอย่าง
var x = document.createElement("PROGRESS");
คุณสมบัติของวัตถุความคืบหน้า
Property | Description |
---|---|
labels | Returns a list of the progress bar's labels (if any) |
max | Sets or returns the value of the max attribute of a progress bar |
position | Returns the current position of the progress bar |
value | Sets or returns the value of the value attribute of a progress bar |
คุณสมบัติและเหตุการณ์มาตรฐาน
ออบเจ็กต์ Progress ยังสนับสนุนคุณสมบัติและเหตุการณ์ มาตรฐาน อีกด้วย
หน้าที่เกี่ยวข้อง
อ้างอิง HTML: HTML <ความคืบหน้า> แท็ก