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 57 58 59 60 61
|
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Gestion des lumières extérieures</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="robots" content="noindex" />
<!--<script src="test1.js" type="text/javascript"></script>-->
<script>
document.getElementById('foo').onclick= function(){
var on=getComputedStyle(this, null).color=="rgb(255, 0, 0)";
this.style.color=on?"green":"red";
this.innerHTML=on?"Allumé":"Éteint";
};
</script>
</head>
<body bgcolor="#FFFFFF">
<h1>Gestion des lumières extérieures</h1>
<table width="180" border="1" cellspacing="0" cellpadding="4" bordercolor="#000000">
<tr>
<td>Allée</td>
<!--<td></td>-->
<td>
<center>
<strong>
<div id="foo" class="off">On</div>
<script>
document.getElementById('foo').onclick= function(){
var on=getComputedStyle(this, null).color=="rgb(255, 0, 0)";
this.style.color=on?"green":"red";
this.innerHTML=on?"Allumé":"Éteint";
};
</script>
</strong>
</center>
</td>
</tr>
<tr>
<td>Porche</td>
<!--<td></td>-->
<td>
<center>
<strong>
<div id="foo1" class="off">On</div>
<script>
document.getElementById('foo1').onclick= function(){
var on=getComputedStyle(this, null).color=="rgb(255, 0, 0)";
this.style.color=on?"green":"red";
this.innerHTML=on?"Allumé":"Éteint";
};
</script>
</strong>
</center>
</td>
</tr>
</table>
</body>
</html> |
Partager