Meter max attribute

Definition and usage

max Attribute setting or returning the value of the meter in Kipimo cha <meter> max cha HTML 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 Define the entire range of the meter together.

See also:

HTML Reference Manual:Kipimo cha <meter> max cha HTML

HTML Reference Manual:Mtaguso wa <meter> cha HTML

Instance

Example 1

Change the value of the max attribute in the meter:

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

Try it yourself

Example 2

Return the value of the max attribute in the meter:

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

Try it yourself

Syntax

Return max attribute:

meterObject.max

Set max attribute:

meterObject.max = number

Attribute value

Worth 描述
number 规定作为仪表最大值的浮点数。默认值为 "1"。

技术细节

返回值: 数值,表示作为仪表的最大值的浮点数。

Makampuni ya browser

Inafikia kipimo cha browser cha kwanza kinakubali kipimo hiki kwenye tabia.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Msaada Hakunatumiwa Msaada 6.0 Msaada