Input Range min Property - Change the minimum value: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Range

Description

Input Range min Property - Change the minimum 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. ja va  2  s.co m
    var x = document.getElementById("myRange").min = "50";
    document.getElementById("demo").innerHTML = "The value of the min attribute was changed from '25' to '50'.";
}
</script>

</body>
</html>

Related Tutorials