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

HTML DOM Meter max Property

Meter max Property

Meter Object Reference Meter Object

Example

Change the value of the max property in the meter:

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

Try it »


Definition and Usage

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

The max property specifies the upper limit of the meter. This value must be greater than the min property value.

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

**Tip:** The max property together with the min property specifies the complete range of the meter.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers except Internet Explorer support the max property.

**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

Attribute values

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

Technical Details

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

More examples

Example

Return the value of the max property of the meter:

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

x The output is:

100

Try it »


Related Articles

HTML Reference Manual:HTML max property


Meter Object Reference Meter Object