Meter maxProperty

Meter 对象参考手册Meter Object

Example

Change the value of the max property in the meter:

document.getElementById("myMeter").max="80";

Try it Yourself »

Definition and Usage

The max property sets or returns the value of the max attribute in the meter.

The max attribute specifies the upper bound of the meter. This value must be greater than the min attribute value.

If the max attribute value is not specified, the default value is 1.

Tip:The max attribute, together with the min attribute, specifies the complete range of the meter.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the max property except Internet Explorer.

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


Syntax

Return the max property:

meterObject.max

Set the max property:

meterObject.max=number

Property Value

Value Description
number Specifies a floating-point number representing the maximum value of the meter. The default value is "1".

Technical Details

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


More Examples

Example

Return the value of the max property in the meter:

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

xThe output result is:

100

Try it Yourself »


Related Articles

HTML Reference Manual:HTML <meter> max Attribute


Meter 对象参考手册Meter Object

Other Extensions