简单教程
提交运行
代码编辑器:
<input type="range" id="myRange"><br><br> <button onclick="disableBtn()">禁用滑块控件</button> <button onclick="undisableBtn()">启用滑块控件</button> <script> function disableBtn() { document.getElementById("myRange").disabled = true; } function undisableBtn() { document.getElementById("myRange").disabled = false; } </script>
运行结果: