Input Range step Property - Display the value of the step attribute of a slider control: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Range

Description

Input Range step Property - Display the value of the step attribute of a slider control:

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() {/* ww  w.  ja v  a2  s .co  m*/
    document.getElementById("myRange").stepUp();
    
    var x = document.getElementById("myRange").step;
    console.log(x);
}
</script>

</body>
</html>

Related Tutorials