Meter optimumProperty

Meter 对象参考手册Meter Object

Examples

Return the value of the optimum property in the meter:

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

xThe output result is:

0.5

Try it yourself »

Definition and Usage

The optimum property sets or returns the value of the optimum attribute of a meter.

The optimum attribute specifies the range within which the meter value is defined as the optimal value.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Except for Internet Explorer, other major browsers support the optimum attribute.

Note:Safari 5 and earlier versions do not support the optimum attribute.


Syntax

Return the optimum property:

meterObject.optimum

Set the optimum property:

meterObject.optimum=number

Property Values

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

Technical Details

Return value: A number, a floating-point number representing the optimal value of the meter.


More Examples

Example

Change the value of the optimum property in the meter:

document.getElementById("myMeter").optimum="0.7";

Try it yourself »


Related Articles

HTML Reference Manual:HTML <meter> optimum Attribute


Meter 对象参考手册Meter Object

Other Extensions