Open In App

HTML | DOM Meter high Property

Last Updated : 01 Dec, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The DOM Meter high Property is used to set or return the value of the high attribute in a gauge. The high attribute is used to specify the range where the value of gauge is considered to be of high value. 
The high value would be less than the max attribute but more than the min and low attribute values.
Syntax: 

  • It returns the high property. 
meterObject.high
  • It is used to set the high property. 
meterObject.high = number 

Property Values: It contains the value i.e number which specifies the floating point number that represents the high value.
Return Value: It returns a numeric value that represents the floating point number that is to be considered high value. 
Example-1: This Example return the high Property.  

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
      HTML | DOM Meter high Property
  </title>
</head>
 
<body>
    <h1>
      GeeksforGeeks
  </h1>
    <h2>
      DOM Meter high Property:
  </h2> Sachin's score:
 
    <!-- assigning id to meter with
        properties. -->
    <meter value="5"
           min="0"
           max="10">
        5 out of 10
    </meter>
 
    <br>Laxma score:
 
    <!-- meter tag using value property. -->
    <meter id="GFG"
           min="0"
           low="40"
           high="60"
           max="100"
           value="65">
  </meter>
    <br>
 
    <button onclick="Geeks()">
        Submit
    </button>
 
    <p id="sudo"
       style="font-size:25px;
              color:green;">
  </p>
 
 
 
 
 
    <script>
        function Geeks() {
 
            // Accessing 'meter' tag.
            var g =
                document.getElementById(
                  "GFG").high;
            document.getElementById(
              "sudo").innerHTML = g;
        }
    </script>
 
</body>
 
</html>


Output: 
Before Clicking On Button: 
 

After Clicking On Button: 
 

Example-2: This Example sets the high Property
 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
      HTML | DOM Meter high Property
  </title>
</head>
 
<body>
    <h1>
      GeeksforGeeks
  </h1>
    <h2>
      DOM Meter high Property:
  </h2> Sachin's score:
 
    <!-- assigning id to meter with
        properties. -->
    <meter value="5"
           min="0"
           max="10">
        5 out of 10
    </meter>
 
    <br>Laxma score:
 
    <!-- meter tag using value property. -->
    <meter id="GFG"
           min="0"
           low="40"
           high="60"
           max="100"
           value="65">
  </meter>
    <br>
 
    <button onclick="Geeksr()">
        Return
    </button>
    <button onclick="Geekss()">
        Set
    </button>
 
    <p id="sudo"
       style="font-size:25px;
              color:green;">
  </p>
 
 
 
 
 
    <script>
        function Geekss() {
 
            // Set 'meter' tag.
            var g =
                document.getElementById(
                  "GFG").high = "70";
           
            document.getElementById("sudo").innerHTML =
              "The value of the high attribute was changed to "
            + g;
        }
 
        function Geeksr() {
 
            // Accessing 'meter' tag.
            var g =
                document.getElementById("GFG").high;
            document.getElementById("sudo").innerHTML =
              "The value of the high attribute was changed to "
            + g;
        }
    </script>
 
</body>
 
</html>
                    


Output : 
Initially: 
 

After Clicking On Return Button: 
 

After Clicking On set Button: 
 

Supported Browsers:

  • Google Chrome 6 and above
  • Edge 18 and above
  • Firefox 16 and above
  • Opera 11 and above
  • Safari 6 and above
  • Internet Explorer not supported

 



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads