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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
/* ******** valeur par défaut ******** */
table
{
margin: 10px auto;
padding: 0;
font-size: 0.9em;
border-collapse: collapse;
border: 2px solid rgb(0,3,158);
color: rgb(0,3,158);
font-size: 0.85em
}
th
{
font-weight: bold;
background-color: rgb(0,3,158);
color: white;
font-weight: bold
}
th, td
{
border: 1px solid rgb(0,3,158);
text-align: center;
padding: 0.2em 1em;
margin: 0
}
/* ******** couleur1 ******** */
div.couleur1 table{
border: 2px solid rgb(192,192,192);
color: rgb(192,192,192);
}
div.couleur1 th{
background-color: rgb(192,192,192);
border: 1px solid rgb(192,192,192);
}
div.couleur1 td{
border: 1px solid rgb(192,192,192);
}
/* ******** couleur2 ******** */
div.couleur2 table{
border: 2px solid rgb(0,3,158);
color: rgb(0,3,158);
}
div.couleur2 th{
background-color: rgb(0,3,158);
border: 1px solid rgb(0,3,158);
}
div.couleur2 td{
border: 1px solid rgb(0,3,158);
}
</style>
<script type="text/javascript">
// <![CDATA[
function DisableElement(Nom, valeur)
{
if (valeur == true){
//document.getElementById(Nom).className = '';
document.getElementById(Nom).className = 'couleur1';
} else {
document.getElementById(Nom).className = 'couleur2';
}
var myElts = document.getElementById(Nom).getElementsByTagName('input');
for(var i = 0; i <= myElts.length-1; i++){
myElts[i].disabled = valeur
}
}
function DisZone(maCheckBox)
{
var maValeur = maCheckBox.checked;
DisableElement('z_' + maCheckBox.id, (maValeur?0:1));
}
// ]]>
</script>
</head>
<body>
<p><label><input type="checkbox" id="CheckCouleur1" onclick="DisZone(this)"/> Activer Zone 1</label></p>
<div id="z_CheckCouleur1">
<table>
<thead>
<tr>
<th colspan="7">MON TITRE</th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" id="D_MEMB0" /></td>
<td><input type="checkbox" id="D_MEMB1" /></td>
<td><input type="checkbox" id="D_MEMB2" /></td>
<td><input type="checkbox" id="D_MEMB3" /></td>
<td><input type="checkbox" id="D_MEMB4" /></td>
<td><input type="checkbox" id="D_MEMB5" /></td>
<td>aaa</td>
</tr>
<tr>
<td><input type="checkbox" id="D_TAG0" /></td>
<td><input type="checkbox" id="D_TAG1" /></td>
<td><input type="checkbox" id="D_TAG2" /></td>
<td><input type="checkbox" id="D_TAG3" /></td>
<td><input type="checkbox" id="D_TAG4" /></td>
<td><input type="checkbox" id="D_TAG5" /></td>
<td>bbb</td>
</tr>
</tbody>
</table>
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
</tr>
</table>
</div>
<p><label><input type="checkbox" id="CheckCouleur2" onclick="DisZone(this)"/> Activer Zone 2</label></p>
<div id="z_CheckCouleur2">
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
</tr>
</table>
</div>
</body>
</html> |
Partager