Disable and enable a slider control:
<!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() {// w w w. j ava 2 s .c o m document.getElementById("myRange").disabled = true; } function enableBtn() { document.getElementById("myRange").disabled = false; } </script> </body> </html>