Bonjour !
J'ai un petit soucis sur ce morceau de code, je comprend pas très bien d'où ça peut provenir :
et sur mes cellules j'ai :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 function Couleur(id) { this.priorite1 = '#FE0000'; this.priorite2 = '#FFCC00'; this.priorite3 = '#00FF08'; this.id=id; if (document.getElementById(this.id).style.bgcolor== this.priorite1 ){ document.getElementById(this.id).style.bgcolor= this.priorite2; } else if (document.getElementById(this.id).style.bgcolor== this.priorite2){ document.getElementById(this.id).style.bgcolor= this.priorite3; } else if (document.getElementById(this.id).style.bgcolor== this.priorite3){ document.getElementById(this.id).style.bgcolor= this.priorite1; } }
Sur click la couleur ne change pourtant pas : x
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 <td id="1-10" onclick="Couleur(this.id)" bgcolor="#00FF08"> 10 </td>
Merci d'avance !
Partager