Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Meter object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Meter object


The Meter object

Meter objects are new in HTML5.

The Meter object represents an HTML-lt;meter-and-gt; element.

Access the Meter object

You can use getElementById() to access the elements:

var x = document.getElementById("myMeter"); try it

Create a Meter object

You can use the document.createElement() method to create the element of the .lt;meter:

var x = document.createElement("METER"); try it

Meter object properties

Attributes describe
high Set or return the value of the HIGH attribute in the metric.
labels 返回度量的 <label> 元素的列表。
low Set or return the value of the LOW attribute in the metric.
max Set or return the value of the MAX property in the metric.
min Set or return the value of the min attribute in the metric.
optimum Set or return the value of the Optimum property in the metrics.
value Set or return the value of the Value property in the metric.

Standard properties and events

Meter objects also support standard properties and events.


Related articles

HTML Reference Manual: HTML slt;meter.gt; Tags