Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Meter value Property

Meter value Property

Meter Object Reference Meter Object

Example

Change the value of the value property in the meter:

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

Try it »


Definition and Usage

The value property sets or returns the value of the value attribute of the meter element.

The value property is required and specifies the current value of the meter. This value must be between the min and max property values.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers except Internet Explorer support the value property.

**Note:** Safari 5 and earlier versions do not support the value property.


Syntax

Return the value attribute:

meterObject

.value

Set the value attribute:

meterObject

.value=

number

Attribute values

Value Description
number Specifies a floating-point number representing the current value of the meter.

Technical Details

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

More examples

Example

Return the value of the value property of the meter:

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

x The output is:

65

Try it »


Related Articles

HTML Reference Manual:HTML value attribute


Meter Object Reference Meter Object