Input Range max Property - Change the maximum value: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Range

Description

Input Range max Property - Change the maximum value:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>
Points: <input type="range" id="myRange" min="25" max="75">

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

<p id="demo"></p>

<script>
function myFunction() {//  w w  w. ja v  a2 s  .co m
    document.getElementById("myRange").max = "90";
    document.getElementById("demo").innerHTML = "changed";
}
</script>

</body>
</html>

Related Tutorials