Name

Meter — a graphical meter or gauge

Inherits from

Node, Element

Synopsis

A Meter object represents an HTML <meter> element that displays a graphical representation of a value within a range of possible values, where the range may optionally be annotated to indicate regions that are considered low, optimum, and high.

Most of the properties of this object simply mirror the HTML attributes with the same name. The JavaScript properties are numbers, however, while the HTML attributes are strings.

<meter> is an HTML5 element that, at the time of this writing, is not yet widely supported.

Properties

readonly Form form

The Form element, if there is one, that is the ancestor of this element or that was identified with the HTML form attribute.

double high

If specified, this property indicates that values between high and max should be graphically indicated as “high”.

readonly NodeList labels

An array-like object of Label elements that are associated with this element.

double low

If specified, this property indicates that values between min and low should be graphically indicated as “low”.

double max

The maximum value that can be displayed by the <meter>. The default is 1.

double min

The minimum value that can be displayed by the <meter>. The default is 0.

double optimum

If specified, the value that should be considered an optimum value.

double value

The value that is represented by this <meter>.

Get JavaScript: The Definitive Guide, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.