Apparaitre 2 tablaeu en js
tahaniabdou
Messages postés
49
Date d'inscription
Statut
Membre
Dernière intervention
-
Alain_42 Messages postés 5361 Date d'inscription Statut Membre Dernière intervention -
Alain_42 Messages postés 5361 Date d'inscription Statut Membre Dernière intervention -
Bonjour,je voudrai faire apparaitre avec java script en utilisant 2 boutton radio 2 tableau chacun d'eux fait apparaitre un tableau différent sa dépend quelle radio je coche. si quelqu'un a un script a me proposé.
merci d'avance.
@+
merci d'avance.
@+
A voir également:
- Apparaitre 2 tablaeu en js
- Supercopier 2 - Télécharger - Gestion de fichiers
- Apparaitre hors ligne instagram - Guide
- Apparaitre hors ligne whatsapp - Guide
- Comment ne pas apparaître en ligne sur facebook - Guide
- 2 ecran pc - Guide
1 réponse
voilà un chti bout de code exemple:
<html> <head> <script type="text/javascript"> function affich(id_bt_choix,id_aff,id_masquer){ var obj_bt=document.getElementById(id_bt_choix); var obj_aff= document.getElementById(id_aff); var obj_masquer= document.getElementById(id_masquer); if(obj_bt.checked == true){ if(obj_aff.style.visibility=="hidden") obj_aff.style.visibility="visible"; if(obj_masquer.style.visibility=="visible") obj_masquer.style.visibility="hidden"; } } </script> </head> <body> <form name="test" method="post" action=""> <input type="radio" name="bt_choix" id="bt_choix_1" value="choix_1" onChange="affich('bt_choix_1','table1','table2');">Affiche table 1<br /> <input type="radio" name="bt_choix" id="bt_choix_2" value="choix_1" onChange="affich('bt_choix_2','table2','table1');">Affiche table 2<br /><br /><br /> <table id="table1" style="visibility:hidden;"> <tr><td>Je suis table 1</td></tr> </table> <table id="table2" style="visibility:hidden;"> <tr><td>Je suis table 2</td></tr> </table> </body> </html>