HTML DOM MeterObject
Meter Object
The Meter object is new in HTML5.
The Meter object represents an HTML <meter> element.
Access a Meter Object
You can use getElementById() to access a <meter> element:
var
x = document.getElementById("myMeter");
Try it Yourself
Create a Meter Object
You can use the document.createElement() method to create a <meter> element:
var x = document.createElement("METER");
Try it Yourself
Meter Object Properties
| Property | Description |
|---|---|
| high | Sets or returns the value of the high attribute in the meter. |
| labels | Returns a list of <label> elements for the meter. |
| low | Sets or returns the value of the low attribute in the meter. |
| max | Sets or returns the value of the max attribute in the meter. |
| min | Sets or returns the value of the min attribute in the meter. |
| optimum | Sets or returns the value of the optimum attribute in the meter. |
| value | Sets or returns the value of the value attribute of the meter. |
Standard Properties and Events
The Meter object also supports standardpropertiesandand events。
Related Articles
HTML Reference Manual:HTML <meter> Tag
Other Extensions