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() {/*from  w w  w .j av a 2 s.  c om*/
    document.getElementById("myRange").max = "90";
    document.getElementById("demo").innerHTML = "changed";
}
</script>

</body>
</html>

Related Tutorials