HTML | DOM Meter high Property

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 string value which represents the floating point number that is to be considered high value.

Example-1: This Example sets the high Property.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
      DOM Meter Object
  </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>

chevron_right


Output:
Before Clicking On Button:

After Clicking On Button:

Example-2: This Example sets the high Property.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
      DOM Meter Object
  </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>
                     

chevron_right


Output :
Initilly:

After Clicking On Return Button:

After Clicking On set Button:



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.