HTML DOM Progress 對象
Progress 對象
Progress 對像是HTML5 新增的。
Progress 對象表示一個HTML <progress> 元素。
<progress> 元素表示任務的進度。
訪問Progress 對象
你可以通過使用getElementById() 來訪問<progress> 元素:
var x = document.getElementById("myProgress"); 嘗試一下
創建Progress 對象
你可以使用document.createElement() 方法來創建<progress> 元素:
var x = document.createElement("PROGRESS"); 嘗試一下
Progress 對象屬性
屬性 | 描述 |
---|---|
labels | 返回進度條的標籤的列表(如果有的話) |
max | 設置或者返回進度條max 屬性的值 |
position | 返回當前進度條的位置 |
value | 設置或者返回進度條value 屬性的值 |
標準屬性和事件
相關文章
HTML參考手冊: HTML <progress>標籤