Javascript examples for DOM HTML Element:Meter
The optimum property sets or gets the optimum attribute in a gauge, which is the value considered to be an optimal value.
Set the optimum property with the following Values
Value | Description |
---|---|
number | Sets a floating point number that is the optimal value of the gauge |
A Number, representing a floating point number that is the optimal value of the gauge
The following code shows how to return the value of the optimum attribute in a gauge:
<!DOCTYPE html> <html> <body> <meter id="myMeter" value="0.3" high="0.9" low="0.1" optimum="0.5"></meter> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w w w . j av a2 s.c o m*/ var v = document.getElementById("myMeter").optimum; document.getElementById("demo").innerHTML = v; } </script> </body> </html>