1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| function clignotte(mycell,couleur){
mycell.style.backgroundColor=(mycell.style.backgroundColor=='white')?couleur:'white';
}
function run(mycell,couleur){
mycell.flash=setInterval(function(){clignotte(mycell,couleur)},500);
}
function populate(){
var TabCells=document.getElementById("mytable").getElementsByTagName('td');
var i=0;
while(TabCells[i]){
if(TabCells[i].className.indexOf("cligno")==0){
Couleur=TabCells[i].className.replace('cligno','');
run(TabCells[i],Couleur)}
i++;
}
}
</script>
</script>
<style type="text/css">
td {border:solid 1px black;
width:100px;}
</style>
<title>Nouvelle page 1</title>
</head>
<body onload="populate()">
<table id='mytable'>
<tr>
<td class="clignogreen"> </td>
<td class="clignored"> </td>
<td> </td>
</tr>
<tr>
<td class="clignoyellow"> </td>
<td class="clignoblue"> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td class="cligno#EEFFCC"> </td>
<td> </td>
</tr>
<tr>
<td class="clignosalmon"> </td>
<td> </td>
<td class="cligno#FF0000"> </td>
</tr>
</table>
</body> |
Partager