Input Range disabled Property - Disable and enable a slider control: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Range

Description

Input Range disabled Property - Disable and enable a slider control:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<button onclick="disableBtn()">Disable Slider Control</button>
<button onclick="enableBtn()">Enable Slider Control</button>

<script>
function disableBtn() {//from   ww  w.  j a  v a  2 s  . com
    document.getElementById("myRange").disabled = true;
}

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

</body>
</html>

Related Tutorials