HTMLProgressElement

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

HTMLProgressElement 接口提供用于操作 <progress> 元素布局和呈现的特定属性和方法(除了常规 HTMLElement 接口之外,它还可以通过继承来使用)。

EventTarget Node Element HTMLElement HTMLProgressElement

实例属性

从其父接口 HTMLElement 继承属性。

HTMLProgressElement.max

一个反映同名内容属性的 double 值,仅限于大于零的数字。其默认值是 1.0

HTMLProgressElement.position 只读

返回一个 double 值,返回当前值(value)除以最大值(max)的结果;如果进度条是不确定的进度条,它返回 -1

HTMLProgressElement.value

一个反映当前值的 double 值;如果进度条是不确定的进度条,它返回 0

HTMLProgressElement.labels 只读

返回包含此元素的 <label> 元素列表的 NodeList

实例方法

无特定方法;从其父接口 HTMLElement 继承方法。

规范

Specification
HTML
# htmlprogresselement

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
HTMLProgressElement
labels
max
position
value

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

参见