Javascript examples for DOM HTML Element:Meter
The value property sets or gets the value attribute in a gauge.
Set the value property with the following Values
Value | Description |
---|---|
number | Sets a floating point number that is the current value of the gauge |
A Number, representing a floating point number that is the current value of the gauge
The following code shows how to change the value of the value attribute in a gauge:
<!DOCTYPE html> <html> <body> <meter id="myMeter" min="0" low="40" high="95" max="100" value="65"></meter> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/* ww w.j a v a2 s. co m*/ document.getElementById("myMeter").value = "50"; document.getElementById("demo").innerHTML = "The value of the value attribute was changed from '65' to '50'."; } </script> </body> </html>