You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
731 B
38 lines
731 B
var color = 'normal';
|
|
var nb = 0;
|
|
|
|
function changeColorMode() {
|
|
let selectColor = document.getElementById('color-selector');
|
|
selectColor.addEventListener('change', function() {
|
|
var index = selectColor.selectedIndex;
|
|
// Rapporter cette donnée au <p>
|
|
if (index != null){
|
|
nb= index;
|
|
}
|
|
|
|
})
|
|
/* if(color !== selectColor.value){
|
|
color = selectColor.value;
|
|
}*/
|
|
return nb;
|
|
|
|
}
|
|
|
|
|
|
console.log(nb);
|
|
/*var nb = 0;
|
|
|
|
let selectColor = document.getElementById('color-selector');
|
|
|
|
selectColor.addEventListener('change', function() {
|
|
var index = selectColor.selectedIndex;
|
|
// Rapporter cette donnée au <p>
|
|
if (index != null){
|
|
nb= index;
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
*/ |