Javascript DOM HTML Input Range stepUp() Method with default value

Introduction

Increment the value of a slider control by "1" (default):

document.getElementById("myRange").stepUp();

Click the button to increment the value of the slider control by "1".

View in separate window

<!DOCTYPE html>
<html>
<body>

Points: <input type="range" id="myRange" value="60">

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

<script>
function myFunction() {/* www . j  av  a  2  s  . c  o  m*/
  document.getElementById("myRange").stepUp();
}
</script>

</body>
</html>



PreviousNext

Related