Meter value attribute
Definition and Usage
value
attribute sets or returns value attribute value.
The value attribute specifies the current or "measured" value of the gauge and must be between min and max between attribute values.
The value attribute is <meter> Tag The required attribute.
See also:
HTML Reference Manual:HTML <meter> value ɗanar
HTML Reference Manual:HTML <meter> ɗanar
Instance
Example 1
Change the value attribute in the meter:
document.getElementById("myMeter").value = "50";
Example 2
Return the value of the value attribute in the meter:
var x = document.getElementById("myMeter").value;
Syntax
Return value attribute:
meterObject.value
Set value attribute:
meterObject.value = number
attribute value
value | description |
---|---|
number | 规定作为仪表当前值的浮点数。 |
技术细节
返回值: | 数值,表示仪表当前值的浮点数。 |
---|
浏览器支持
表中的数字注明了首个完全支持该属性的浏览器版本。
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
支持 | 不支持 | 支持 | 6.0 | 支持 |