Javascript DOM HTML Meter low Property get

Introduction

Return the value of the low attribute in a gauge:

var x = document.getElementById("myMeter").low;

Click the button to return the value of the low attribute of the gauge.

View in separate window

<!DOCTYPE html>
<html>
<body>

<p>My scale: <meter id="myMeter" min="0" low="40" high="95" max="100" value="65"></meter></p>
<button onclick="myFunction()">Test</button>
<p id="demo"></p>

<script>
function myFunction() {//from  w  w w. j a v a2s  .  c om
  var x = document.getElementById("myMeter").low;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>



PreviousNext

Related