Bonjour,
j'ai le code source suivant :
Quand je le lance la console avec Firefox il entre bien dans la fonction afficher() mais rien ne ce passe.
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
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 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Assemblée Générale</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" href="./bulletin.css" type="text/css"> <script type="text/javascript"> function afficher() { if(document.getElementById("formSaisie").test.value == "non") document.getElementById("non").style.visibility = "block"; if(document.getElementById("formSaisie").test.value == "oui") document.getElementById("oui").style.visibility = "block"; } </script> </head> <body> <img src="./Montjoie_logo.jpeg" height="100px" width="300px"> <p align="center">ASSEMBLEE GENERALE du 21 juin 2012</p> <p align="center">Bulletin à retourner avant <strong>le 15 juin</strong></p> <form method="post" action="contactAG.php" name="formSaisie" id="formSaisie"> <table> <tr> <td><input type="radio" name="civilite" value="Mme">Mme <input type="radio" name="civilite" value="M" checked>M.<br /></td> <td><input type="text" name="nom" size="40" style="margin-left: -175px;"></td><br /> </tr> <tr> <td>Participation : <select name="test" onChange="afficher();" id="test"> <option value="rien"></option> <option value="oui">Non</option> <option value="non">Oui</option> </select> </td> </tr> <tr> <td> <div id="oui" style="display:none"> <input type="checkbox" name="participation[]" value="AG : 14h30-16h30" id="participationOui">à l'Assemblée générale (14h30 - 16h30) </div> </td><br /> <td> <div id="oui" style="display:none"> <input type="checkbox" name="participation[]" value="CA : 16h30-16h45" id="participationOui">au Conseil d'administration (16h30 - 16h45) </div> </td><br /> <td> <div id="oui" style="display:none"> <input type="checkbox" name="participation" value="Collation" id="participationOui">à la collation </div> </td><br /> </tr> <tr> <td> <div id="non" style="display:none"> <input type="checkbox" name="participationNon[]" value="Ne Participera Pas" id="participationNon"> <strong>ne participera pas à l'Assemblée générale</strong><br /> </div> </td> </tr> </div> <tr> <td><input type="submit" value="Envoyer"></td> </tr> </table> </form> </body> </html>
Partager