Meter value Property
Example
Change the value of the value attribute in a gauge:
document.getElementById("myMeter").value = "50";
Try it Yourself »
Definition and Usage
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
The value property is supported in Firefox, Opera, Chrome, and Safari 6.
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;
The result of x will be:
65
Try it Yourself »
Related Pages
HTML reference: HTML <meter> value attribute
Meter Object