Meter valueProperty
Example
Change the value of the meter's value attribute:
document.getElementById("myMeter").value="50";
Try it Yourself »
Definition and Usage
The value attribute sets or returns the value of the value attribute in a meter.
The value attribute is required and specifies the current value of the meter. This value must be between the min and max attribute values.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the value attribute, except Internet Explorer.
Note:Safari 5 and earlier versions do not support the value attribute.
Syntax
Return the value attribute:
meterObject.value
Set the value attribute:
meterObject.value=number
Property Value
| Value | Description |
|---|---|
| number | Specifies a floating-point number representing the current value of the meter. |
Technical Details
| Return Value: | A number, a floating-point number representing the current value of the meter. |
|---|
More Examples
Example
Return the value of the meter's value attribute:
var x = document.getElementById("myMeter").value;
xThe output result is:
65
Try it Yourself »
Related Articles
HTML Reference Manual:HTML <meter> value Attribute
Other Extensions
Meter Object