Open In App

HTML | DOM Input Range stepUp() Method

Last Updated : 31 Aug, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The DOM Input Range stepUp() method in HTML DOM is used to increase the value of the slider control by the given number

Syntax:

rangeObject.stepUp(number)

Parameters: It accepts a single and required parameter:

  • number: It specifies the number of slider control to be increased. By default, it is incremented by 1.

Return Value: It doesn’t return any value. 

Example: This example shows the working of stepUp() method

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML DOM Input Range stepUp() Method
    </title>
</head>
 
<body style="text-align:center;">
 
    <h1>
      GeeksForGeeks
  </h1>
 
    <h2>
      DOM Input Range stepUp() Method
  </h2>
    <form id="myGeeks">
        <input type="range"
               id="range_id"
               name="geeks"
               value="70">
    </form>
    <br>
    <button onclick="myGeeks()">
      Click Here!
  </button>
 
    <!-- Script to increment the range -->
    <script>
        function myGeeks() {
            document.getElementById(
              "range_id").stepUp(3);
        }
    </script>
</body>
 
</html>


Output: Before clicking on the button:

  

After clicking on the button ( 10 times ):

  

Supported Browsers: The browser supported by DOM input Range stepUp() method are listed below:

  • Google Chrome 4
  • Mozilla Firefox 23
  • Edge 12
  • Opera 11
  • Safari 3.1


Similar Reads

HTML | DOM Input Date stepUp() Method
The Input Date stepUp() method in HTML DOM is used to increment the value of date field by a specified number. The Input Date stepUp() method can only be used on the days and not on months and years. Syntax: inputdateObject.stepUp( number ) Parameters: This method accepts single parameter number which is used to specify the amount of days the date
2 min read
HTML | DOM Input DatetimeLocal stepUp() Method
The Input DatetimeLocal stepUp() method in HTML DOM is used to increment the value of the Local datetime field by a specified number. The Input DatetimeLocal stepUp() method can only be used on the value Minutes. Years, months, days, hours, seconds or milliseconds are not affected by the stepUp() method. Syntax: datetimelocalObject.stepUp( number )
2 min read
HTML | DOM Input Time stepUp() Method
The DOM Input Time stepUp() method in HTML DOM is used to increase the value of the time field by the given number. It will only affect the number of minutes (not hours, seconds or milliseconds). Syntax: timeObject.stepUp(number) Parameters: It accepts a single and required parameter: number: It specifies the number of minutes to be increased. By d
1 min read
HTML DOM Input Number stepUp() Method
The Input Number stepUp() method in HTML DOM is used to increase the value of the number field by the given value. Syntax: numberObject.stepUp( number )Parameters: It accepts a single parameter that is required: number: It specifies the number by which the number field will be increased. By default, it is incremented by 1.Return Value: It doesn’t r
1 min read
HTML DOM Input Month stepUp() Method
The Input Month stepUp() method in HTML DOM is used to increase the value of the month field by the given number. This method will only increase the value of months not years.  Syntax:  monthObject.stepUp( number )Parameters: It accepts a single parameter which is required. number It specifies the number of months to be increased. By default, the m
1 min read
HTML DOM Input Week stepUp() Method
The Input Week stepUp() method in HTML DOM is used to increase the value of the week field by the given number. This method will only increase the value of weeks not years. Syntax: weekObject.stepUp( number )Parameters: It accepts a single parameter number which is mandatory. It specifies the number of weeks to be increased. By default, the weeks i
1 min read
jQuery UI Spinner stepUp() Method
The jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. The jQueryUI spinner widget helps us to increment and decrement values of an input element using up and down arrow. In this article, we will see how to use stepUp() Method in jQue
2 min read
HTML | DOM Input Range stepDown() Method
The DOM Input Range stepDown() method in HTML DOM is used to decrease the value of the slider control by the given number. Syntax: rangeObject.stepDown(number) Parameters: It accepts a single and required parameter: number: It specifies the number of slider control to be decreased. By default, it is decremented by 1. Return Value: It doesn’t return
1 min read
HTML | DOM Input Range max Property
The Input Range max Property in HTML DOM is used to set or return the value of max attribute of the slider control. The max attribute is used to specify the maximum value of slider control. Syntax: It returns the Input Range max Property:rangeObject.maxIt is used to set Input Range max Property:rangeObject.max = number Property Values: It contains
2 min read
HTML | DOM Input Range Object
The Input Range Object in HTML DOM is used to represent the HTML &lt; input &gt; element with type="range". This object is used to access or create the &lt;input&gt; element. This element can be accessed by using getElementById() method. Syntax: document.getElementById("Input_ID"); This Input_ID is assigned to HTML &lt;input&gt; element. Example-1:
2 min read
Article Tags :