The high
property sets or gets the high attribute in a gauge.
The high
attribute from the meter element
specifies the gauge's value that is considered to be a high value.
This value must be less than the max attribute value, and greater than the low and min attribute values.
high |
Yes | No | Yes | Yes | Yes |
Return the high property.
var v = meterObject.high
Set the high property.
meterObject.high=number
Value | Description |
---|---|
number | Set a number as a high value |
A Number type value representing a floating point number as a high value.
The following code shows how to get the high 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() {<!--from w ww .jav a 2 s . co m-->
var x = document.getElementById("myMeter").high;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
The code above is rendered as follows:
The following code shows how to change the high 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>
<script>
function myFunction() {<!-- w w w .j av a 2 s .c o m-->
document.getElementById("myMeter").high = "60";
}
</script>
</body>
</html>
The code above is rendered as follows: