Edit This Code:
<!DOCTYPE html>
<html>
<body>

<input type="range" id="myRange"><br><br>

<button onclick="disableBtn()">Disable Slider Control</button>
<button onclick="undisableBtn()">Undisable Slider Control</button>

<p><strong>Note:</strong> input elements with type="range" are not supported in IE 9 and earlier versions.</p>

<script>
function disableBtn() {
    document.getElementById("myRange").disabled = true;
}

function undisableBtn() {
    document.getElementById("myRange").disabled = false;
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy