Input Range stepUp() Method
Example
Increment the value of a slider control by "10":
document.getElementById("myRange").stepUp(10);
Try it Yourself »
Definition and Usage
The stepUp() method increments the value of the slider control by a specified number.
Tip: To decrement the value, use the stepDown() method.
Browser Support
Method | |||||
---|---|---|---|---|---|
stepUp() | Yes | 12.0 | Yes | Yes | Yes |
Syntax
rangeObject.stepUp(number)
Parameter Values
Parameter | Description |
---|---|
number | Required. Specifies the amount the value of the slider control should increase. If omitted, the value is incremented by "1" |
Technical Details
Return Value: | No return value |
---|
More Examples
Example
Increment the value of a slider control by "1" (default):
document.getElementById("myRange").stepUp();
Try it Yourself »
❮ Input Range Object