Javascript examples for DOM HTML Element:Input Color
Input Color disabled Property - Disable and enable a color picker:
<!DOCTYPE html> <html> <body> <input type="color" id="myColor"><br><br> <button onclick="disableBtn()">Disable Color Picker</button> <button onclick="undisableBtn()">Enable Color Picker</button> <script> function disableBtn() {// ww w .ja v a 2s.com document.getElementById("myColor").disabled = true; } function undisableBtn() { document.getElementById("myColor").disabled = false; } </script> </body> </html>