Meter max attribute
Definition and Usage
max
Attribute setting or returning the value of HTML <meter> max Attribute Value.
The max attribute specifies the upper limit of the meter, which must be greater than the value of the min attribute.
If not specified, the default value is 1.
Tip:max attribute with min attribute Together define the entire range of the meter.
See also:
HTML Reference Manual:HTML <meter> max Attribute
HTML Reference Manual:HTML <meter> Tag
Instance
Example 1
Change the value of max attribute in the meter:
document.getElementById("myMeter").max = "80";
Example 2
Return the value of max attribute in the meter:
var x = document.getElementById("myMeter").max;
Syntax
Return max attribute:
meterObject.max
Set max attribute:
meterObject.max = number
Attribute value
Value | Description |
---|---|
number | Specifies the floating-point number as the maximum value of the gauge. The default value is "1". |
Technical Details
Return Value: | A floating-point number representing the maximum value of the gauge. |
---|
Browser Support
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Not Supported | Support | 6.0 | Support |