bonjour
voila je suis toujours sur le meme probleme et jarrive pas a la resoudre
jai un code qui me permet en appuyant sur un bouton d aficher un element et d en cacher un autre
jaimerais donc mettre
mes boutons dans un tableaux sur ma page et mon contenu dans un autre tableaux
et faire le meme effet!
c est a dire en appuyant sur un bouton il maffiche dans le tableaux a coter
l element1 correspondant et cache l element 2
et vice versa
voici mon code
<html>
<head>
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="design.css" />
<script src="prototype.js"></script>
<script language="JavaScript">
function affichage(eltAafficher, eltAcacher)
{
var eltAfficher = document.getElementById(eltAafficher);
eltAfficher.style.visibility="visible";
var eltAcacher = document.getElementById(eltAcacher);
eltAcacher.style.visibility="hidden";
}
</script>
</head>
<body>
<div id="courant" class="focus" ; position:absolute; visibility:hidden;">
aaaaa
</div>
<div id="titre" class="cache" ; position:absolute; visibility:hidden;">
bbbbbbbb
</div>
<input type="button" value="compte1" onclick="affichage('courant', 'titre');">
<input type="button" value="compte2" onclick="affichage('titre','courant');">
<body>
</html> Configuration: Windows XP
Firefox 2.0.0.5

