HTMLDOMメーターオブジェクト
メーターオブジェクト
Meterオブジェクトは、HTMLの<meter>要素を表します。
注: <meter>要素は、Internet Explorer / EdgeまたはSafari5(およびそれ以前のバージョン)ではサポートされていません。
メーターオブジェクトにアクセスする
getElementById()を使用して、<meter>要素にアクセスできます。
例
var x = document.getElementById("myMeter");
メーターオブジェクトを作成する
document.createElement()メソッドを使用して、<meter>要素を作成できます。
例
var x = document.createElement("METER");
メーターオブジェクトのプロパティ
Property | Description |
---|---|
high | Sets or returns the value of the high attribute in a gauge |
labels | Returns a list of <label> elements that are labels for the gauge |
low | Sets or returns the value of the low attribute in a gauge |
max | Sets or returns the value of the max attribute in a gauge |
min | Sets or returns the value of the min attribute in a gauge |
optimum | Sets or returns the value of the optimum attribute in a gauge |
value | Sets or returns the value of the value attribute in a gauge |
標準のプロパティとイベント
Meterオブジェクトは、標準のプロパティとイベントもサポートしています。
関連ページ
HTMLリファレンス:HTML <meter>タグ