Javascript examples for DOM HTML Element:Input Color
Input Color value Property - Get the color of a color picker:
<!DOCTYPE html> <html> <body> A color picker: <input type="color" id="myColor" value="#ff0080"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {// w w w. jav a 2 s . c o m var x = document.getElementById("myColor").value; document.getElementById("demo").innerHTML = x; } </script> </body> </html>