Latest web development tutorials

HTML DOM Meter value property

Meter Object Reference Meter Object

Examples

Change the metric value attribute:

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

try it"

Definition and Usage

value property sets or returns the metric value property.

value attribute is required, the provisions of a measure of the current value. The value must be between min and max attribute values.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

In addition to Internet Explorer, the other major browsers support attribute value.

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


grammar

Returns the value property:

meterObject .value

Set the value property:

meterObject .value= number

Property Value

描述
number 规定一个表示度量的当前值的浮点数。

technical details

return value: Number, a floating-point number represents the current value of the metric.


More examples

Examples

Returns the value of the property value metrics:

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

x The output is:

65

try it"


related articles

HTML Reference Manual: HTML <Meter> value The property


Meter Object Reference Meter Object