Javascript examples for DOM HTML Element:Input Range
The stepUp() method increments the value of the slider control by a specified number.
Parameter | Description |
---|---|
number | Required. Specifies the amount the value of the slider control should increase.Default is "1" |
No return value
The following code shows how to Increment the value of a slider control by "10":
<!DOCTYPE html> <html> <body> Points: <input type="range" id="myRange" value="60"> <button onclick="myFunction()">Test</button> <script> function myFunction() {/* ww w . j a va 2 s . c o m*/ document.getElementById("myRange").stepUp(10); } </script> </body> </html>