编辑下面的代码:【加编码】
<html> <body> <input type="color" id="myColor"> <p>点击 "点我" 按钮禁用以上拾色器。</p> <button onclick="myFunction()">点我</button> <script> function myFunction() { document.getElementById("myColor").disabled = true; } </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂