CheckBox et action avant validation
Voici j'ai un formulaire ou je voudrais grisé les case quand le checkbox correspondant a ces case est pas coché et donc dégrisé quand ce dernier est coché
et tout cela sans validation du formulaire
voici ce que je penseai faire :
Code:
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Modification d un Utilisateur</title>
<script language="javascript" type="text/javascript">
<!--
function Checkbox1_onclick() {
if Checkbox1.checked {
mdp.unselectable = off
mdp1.unselectable= off
}
}
// -->
</script>
</head>
<body style="text-align: center">
<br />
<br />
<br />
Modification d'un Utilisateur<br />
<br />
<br />
<br />
<br />
Identifiant : <input id="Text1" type="text" /><br />
<br />
<input id="Checkbox1" style="width: 16px" type="checkbox" language="javascript" onclick="return Checkbox1_onclick()" />
Ancien Mot de passe : <input id="mdp" name="mdp" type="text" unselectable="on" /><br />
<br />
Nouveau Mot de passe : <input id="mdp1" name="mdp1"
type="text" unselectable="on" /><br />
<br />
<input id="Checkbox2" type="checkbox" />
Role :
<input id="Text4" type="text" unselectable="on" /><br />
</body>
</html> |
merci d'avance pour votre aide