Input Range stepDown() Method - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Range

Description

The stepDown() method decrements the value of the slider control by a specified number.

Parameter Values

Parameter Description
numberRequired. Specifies the amount the value of the slider control should decrease. Default is "1"

Return Value:

No return value

The following code shows how to Decrement the value of a slider control by "10":

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>
Points: <input type="range" id="myRange" value="60">

<button onclick="myFunction()">Test</button>

<script>
function myFunction() {/* w ww.  ja v a 2  s .co  m*/
    document.getElementById("myRange").stepDown(10);
}
</script>

</body>
</html>

Related Tutorials