Meter value Property
Example
Change the value of the value attribute in a gauge:
document.getElementById("myMeter").value = "50";
Try it Yourself »
Description
The value property sets or returns the value of the value attribute in a gauge.
The value attribute specifies the current, or "measured", value of the gauge, and must be between the min and max attribute values.
The value attribute is a required attribute for the <meter> tag.
Browser Support
Property | |||||
---|---|---|---|---|---|
value | Yes | Not supported | Yes | 6.0 | Yes |
Syntax
Return the value property:
meterObject.value
Set the value property:
meterObject.value = number
Property Values
Value | Description |
---|---|
number | Specifies a floating point number that is the current value of the gauge |
Technical Details
Return Value: | A Number, representing a floating point number that is the current value of the gauge |
---|
More Examples
Example
Return the value of the value attribute in a gauge:
var x = document.getElementById("myMeter").value;
Try it Yourself »
Related Pages
HTML reference: HTML <meter> value attribute
❮ Meter Object