Javascript DOM HTML Meter high Property get

Introduction

Return the value of the high attribute in a gauge:

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

Click the button to return the value of the high 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  www  . j a v  a2 s  . com
  var x = document.getElementById("myMeter").high;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>



PreviousNext

Related