Bonjour
J'ai un petit probleme concernant la recuperation de la value d'un groupe de bouton de radio.
voici mes bouton de radio :
J'aiemrai en javascript pouvoir récuperer la case cocher pour chaque groupe.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <table class=tab width=100% > <tr> <td ><span id='title_p'>Co-pro : </span></td><td><span id='title_p'><input type ='radio' name ='copro' id='oui'>oui<input type ='radio' name ='copro' id='non'>non<input type ='radio' name ='copro' id='nc'>NC</span></td> </tr> <tr> <td><span id='title_p'>Part de société : </span></td><td><span id='title_p'><input type ='radio' name ='part' id='ouit'>oui<input type ='radio' name ='part' id='non'>non<input type ='radio' name ='part' id='nc'>NC</span></td> </tr> <tr> <td ><span id='title_p'>Crédit bail : </span></td></td><td><span id='title_p'><input type ='radio' name ='crebail' id='oui'>oui<input type ='radio' name ='crebail' id='non'>non<input type ='radio' name ='crebail' id='nc'>NC</span></td> </tr> </table>
voici mon javascript :
merçi pour votre aide.
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 function verif_divers() { if(document.getElementById('oui').checked==checked) { bouton=0; } if(document.getElementById('non').checked==checked) { bouton=1; } if(document.getElementById('nc').checked==checked) { bouton=2; } return (bouton); }
Partager