Example
Change the value of the max attribute in a gauge:
document.getElementById("myMeter").max = "80";
Try it Yourself »
Definition and Usage
The max property sets or returns the value of the max attribute in a gauge.
The max attribute specifies the upper bound of the gauge, and the value must be greater than the min attribute value.
If unspecified, the default value is 1.
Tip: The max attribute, together with the min attribute, specifies the full range of the gauge.
Browser Support
The max property is supported in Firefox, Opera, Chrome, and Safari 6.
Syntax
Return the max property:
meterObject.max
Set the max property:
meterObject.max=number
Property Values
Value | Description |
---|---|
number | Specifies a floating point number that is the maximum value of the gauge. Default value is "1" |
Technical Details
Return Value: | A Number, representing a floating point number that is the maximum value of the gauge |
---|
More Examples
Example
Return the value of the max attribute in a gauge:
var x = document.getElementById("myMeter").max;
The result of x will be:
100
Try it Yourself »
Related Pages
HTML reference: HTML <meter> max attribute
< Meter Object