Meter value attribute

Definition and Usage

value Sets or returns the value in the meter value attribute value.

The value attribute specifies the current or "measured" value of the meter and must be between min and max between attribute values.

The value attribute is The <meter> tag required attribute.

See also:

HTML Reference Manual:HTML <meter> value Attribute

HTML Reference Manual:HTML <meter> Tag

Instance

Example 1

Change the value attribute in the meter:

document.getElementById("myMeter").value = "50";

Try it yourself

Example 2

Return the value of the value attribute in the meter:

var x = document.getElementById("myMeter").value;

Try it yourself

Syntax

Return the value attribute:

meterObject.value

Set the value attribute:

meterObject.value = number

attribute value

value description
number Specifies the floating-point number as the current value of the gauge.

Technical Details

Return Value: Value, a floating-point number representing the current value of the gauge.

Browser Support

The numbers in the table indicate the first browser version to fully support this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Not Supported Support 6.0 Support