Latest web development tutorials

HTML DOM Meter max property

Meter Object Reference Meter Object

Examples

Change metric max value of the property:

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

try it"

Definition and Usage

max property sets or returns metric max value of the property.

max attribute specifies the metric limit. This value must be greater than the value of property min.

If no max attribute value, the default value is 1.

Tip: max and min attribute specifies the property along with the full range of measurement.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

In addition to Internet Explorer, the other major browsers support max attributes.

Note: Safari version 5 and earlier do not support the max attribute.


grammar

Returns max attributes:

meterObject .max

Setting max attributes:

meterObject .max= number

Property Value

描述
number 规定一个表示度量的最大值的浮点数。默认值是 "1"。

technical details

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


More examples

Examples

Returns metrics max value of the property:

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

x The output is:

100

try it"


related articles

HTML Reference Manual: HTML <Meter> MAX Properties


Meter Object Reference Meter Object