Bonsoir,
j essay de creer un menu avec du javascript, mais un probem se pose car lorsque je clik sur mon bouton "menu" , les sous menu s 'affiche mais verticalement en dessous de "menu" alors que je voudrai k'ils s'affichent horizontalment a la suite du bouton "menu"
http://tho.ftp.free.fr/menu/
voici mon html :
<html>
<head>
<title>menu</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style>
<script src="menu.js"></script>
</head>
<body onLoad="wait();">
<img id="menu" onClick="gic();" src="img/menu1.png" name="menu" width="49" height="21" border="0"><img id="gallerie" src="img/gallerie1.png" width="49" height="21"><img id="infos" src="img/infos1.png" width="49" height="21"><img id="contact" src="img/contact1.png" width="49" height="21">
</body>
</html>
voici mon javascript :
function wait() {
var a,b,c;
a=document.getElementById("gallerie");
a.style.display="none";
b=document.getElementById("infos");
b.style.display="none";
c=document.getElementById("contact");
c.style.display="none";
}
function gic() {
var d,e,f;
d=document.getElementById("gallerie","infos","contact");
if (d.style.display == "none") {
d.style.display = "block" ;
} else {
d.style.display = "none" ;
}
e=document.getElementById("infos");
if (e.style.display == "none") {
e.style.display = "block" ;
} else {
e.style.display = "none" ;
}
f=document.getElementById("contact");
if (f.style.display == "none") {
f.style.display = "block" ;
} else {
f.style.display = "none" ;
}
}