Apparaitre 2 tablaeu en js
Fermé
tahaniabdou
Messages postés
49
Date d'inscription
mercredi 8 avril 2009
Statut
Membre
Dernière intervention
9 janvier 2014
-
7 juin 2009 à 09:55
Alain_42 Messages postés 5358 Date d'inscription dimanche 3 février 2008 Statut Membre Dernière intervention 13 février 2017 - 7 juin 2009 à 13:49
Alain_42 Messages postés 5358 Date d'inscription dimanche 3 février 2008 Statut Membre Dernière intervention 13 février 2017 - 7 juin 2009 à 13:49
A voir également:
- Apparaitre 2 tablaeu en js
- Apparaitre hors ligne whatsapp - Guide
- Apparaitre hors ligne instagram - Guide
- Jdownloader 2 - Télécharger - Téléchargement & Transfert
- Round js ✓ - Forum Javascript
- 2 comptes whatsapp - Guide
1 réponse
Alain_42
Messages postés
5358
Date d'inscription
dimanche 3 février 2008
Statut
Membre
Dernière intervention
13 février 2017
901
7 juin 2009 à 13:49
7 juin 2009 à 13:49
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>