Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite+ 13
How can I check if set is pressed with <input> type="color" </input>?
Short answer would be appreciated
1 Réponse
+ 10
<input type="color" id="cl" onchange="getColor(this.value);">
<script>
function getColor(c){
alert(c);
}
</script>
You could also get it like the following, but you've got to invoke something to get it:
var c = document.getElementById("cl").value;