<html>
<body>
<input type="color" id="myColor"><br><br>
<button onclick="disableBtn()">禁用拾色器</button>
<button onclick="undisableBtn()">撤销禁用拾色器</button>
<p><b>注意:</b>Internet Explorer 11 及更早版本或 Safari 9.1 及更早版本不支持 type="color"。</p>
<script>
function disableBtn() {
document.getElementById("myColor").disabled = true;
}
function undisableBtn() {
document.getElementById("myColor").disabled = false;
}
</script>
</body>
</html>