Knud Gert Ellentoft wrote in dk.edb.internet.webdesign.clientside:
> >
> Jeg kan ikke lige gennemskue det, kan du ikke fortælle, hvor du
> har fundet det?
>
> Så man kan se hele scriptet og selv afårøve det?
Du får hele scriptet her i den udgave jeg skal bruge.
//Drop down menu link- © Dynamic Drive (
www.dynamicdrive.com)
//For full source code and 100's more DHTML scripts, visit
http://www.dynamicdrive.com
//Credit MUST stay intact for use
//Contents for home
var menu1=new Array()
menu1[0]='<a href=test.htm>Menu link here</a><br>'
menu1[1]='<a href=test.htm>Menu link here</a><br>'
menu1[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href=test.htm>Menu link here</a><br>'
menu2[1]='<a href=test.htm>Menu link here</a><br>'
menu2[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href=test.htm>Menu link here</a><br>'
menu3[1]='<a href=test.htm>Menu link here</a><br>'
menu3[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 4
var menu4=new Array()
menu4[0]='<a href=test.htm>Menu link here</a><br>'
menu4[1]='<a href=test.htm>Menu link here</a><br>'
menu4[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 5
var menu5=new Array()
menu5[0]='<a href=test.htm>Menu link here</a><br>'
menu5[1]='<a href=test.htm>Menu link here</a><br>'
menu5[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 6
var menu6=new Array()
menu6[0]='<a href=test.htm>Menu link here</a><br>'
menu6[1]='<a href=test.htm>Menu link here</a><br>'
menu6[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 7
var menu7=new Array()
menu7[0]='<a href=test.htm>Menu link here</a><br>'
menu7[1]='<a href=test.htm>Menu link here</a><br>'
menu7[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 8
var menu8=new Array()
menu8[0]='<a href=test.htm>Menu link here</a><br>'
menu8[1]='<a href=test.htm>Menu link here</a><br>'
menu8[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 9
var menu9=new Array()
menu9[0]='<a href=test.htm>Menu link here</a><br>'
menu9[1]='<a href=test.htm>Menu link here</a><br>'
menu9[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 10
var menu10=new Array()
menu10[0]='<a href=test.htm>Menu link here</a><br>'
menu10[1]='<a href=test.htm>Menu link here</a><br>'
menu10[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 11
var menu11=new Array()
menu11[0]='<a href=test.htm>hold 1</a><br>'
menu11[1]='<a href=test.htm>hold 2</a><br>'
menu11[2]='<a href=test.htm>hold 3</a><br>'
menu11[3]='<a href=test.htm>10m luft</a><br>'
menu11[4]='<a href=test.htm>veteran</a><br>'
menu11[5]='<a href=test.htm>samlet</a><br>'
//Contents for menu 12
var menu12=new Array()
menu12[0]='<a href=test.htm>hold 1</a><br>'
menu12[1]='<a href=test.htm>hold 2</a><br>'
menu12[2]='<a href=test.htm>hold 3</a><br>'
menu12[3]='<a href=test.htm>10m luft</a><br>'
menu12[4]='<a href=test.htm>veteran</a><br>'
menu12[5]='<a href=test.htm>samlet</a><br>'
//Contents for menu 13
var menu13=new Array()
menu13[0]='<a href=test.htm>Menu link here</a><br>'
menu13[1]='<a href=test.htm>Menu link here</a><br>'
menu13[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 14
var menu14=new Array()
menu14[0]='<a href=test.htm>Menu link here</a><br>'
menu14[1]='<a href=test.htm>Menu link here</a><br>'
menu14[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 15
var menu15=new Array()
menu15[0]='<a href=test.htm>Menu link here</a><br>'
menu15[1]='<a href=test.htm>Menu link here</a><br>'
menu15[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 16
var menu16=new Array()
menu16[0]='<a href=test.htm>Menu link here</a><br>'
menu16[1]='<a href=test.htm>medlemss.htm</a><br>'
menu16[2]='<a href=test.htm>Menu link here</a><br>'
//Contents for menu 17
var menu17=new Array()
menu17[0]='<a href=test.htm>Menu link here</a><br>'
menu17[1]='<a href=test.htm>Menu link here</a><br>'
menu17[2]='<a href=test.htm>Menu link here</a><br>'
</script>
<style>
<!--
wrap1{
position:relative;
}
wrap2{
position:absolute;
}
#dropmenu0, #dropmenu1, #dropmenu2, #dropmenu3, #dropmenu4, #dropmenu5,
#dropmenu6, #dropmenu7, #dropmenu8, #dropmenu9, #dropmenu10, #dropmenu11,
#dropmenu12, #dropmenu13, #dropmenu14, #dropmenu15, #dropmenu16{
z-index:100;
}
-->
</style>
<meta name="Microsoft Theme" content="kopi-af-citronpunch1 100, default">
</head>
<body>
<script language="JavaScript1.2">
//reusable/////////////////////////////
//Drop down menu by
http://www.dynamicdrive.com
var zindex=100
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
var opr=navigator.userAgent.indexOf("Opera")
function dropit(e,whichone){
curmenuID=ns6? document.getElementById(whichone).id : eval(whichone).id
if (window.themenu&&themenu.id!=curmenuID)
themenuStyle.visibility=ns4?"hide" : "hidden"
themenu=ns6? document.getElementById(whichone): eval(whichone)
themenuStyle=(ns6||ie4)? themenu.style : themenu
themenuoffsetX=(ie4&&opr==-1)? document.body.scrollLeft : 0
themenuoffsetY=(ie4&&opr==-1)? document.body.scrollTop : 0
themenuStyle.left=ns6||ns4? e.pageX-e.layerX :
themenuoffsetX+event.clientX-event.offsetX
themenuStyle.top=ns6||ns4? e.pageY-e.layerY+19 :
themenuoffsetY+event.clientY-event.offsetY+18
hiddenconst=(ns6||ie4)? "hidden" : "hide"
if (themenuStyle.visibility==hiddenconst){
themenuStyle.visibility=(ns6||ie4)? "visible" : "show"
themenuStyle.zIndex=zindex++
}
else
hidemenu()
return false
}
function hidemenu(){
if ((ie4||ns6)&&window.themenu)
themenuStyle.visibility="hidden"
else if (ns4)
themenu.visibility="hide"
}
if (ie4||ns6)
document.onclick=hidemenu
//reusable/////////////////////////////
</script>
<!----------Menu 1 starts here---------->
<ilayer>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu0');event.cancelBubble=true;return false">
<a href="home.htm"><b><font face="Verdana">Home</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 1 ends here---------->
<!----------Menu 2 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu1');event.cancelBubble=true;return false">
<a href="klubben.htm"><b><font face="Verdana">Klubben</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 2 ends here---------->
<!----------Menu 3 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu2');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Adresser</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 3 ends here---------->
<!----------Menu 4 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu3');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Kalender</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 4 ends here---------->
<!----------Menu 5 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu4');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">HSK-nyt</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 5 ends here---------->
<!----------Menu 6 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu5');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Nyheder</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 6 ends here---------->
<!----------Menu 7 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu6');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Kurser</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 7 ends here---------->
<!----------Menu 8 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu7');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Stævner</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 8 ends here---------->
<!----------Menu 9 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu8');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Resultater</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 9 ends here---------->
<!----------Menu 10 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu9');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Tilmeldinger</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 10 ends here---------->
<!----------Menu 11 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu10');event.cancelBubble=true;return false">
<a href="dsu.htm"><b><font face="Verdana">DSU</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 11 ends here---------->
<!----------Menu 12 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu11');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Billeder</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 12 ends here---------->
<!----------Menu 13 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu12');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font
face="Verdana">Opslagstavlen</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 13 ends here---------->
<!----------Menu 14 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu13');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Links</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 14 ends here---------->
<!----------Menu 15 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu14');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Gæstebog</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 15 ends here---------->
<!----------Menu 16 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu15');event.cancelBubble=true;return false">
<a href="alternate.htm"><b><font face="Verdana">Medlemslogin</font></b></a>
</span>
</div>
</layer>
</ilayer>
<p align="center"><br>
<!----------Menu 16 ends here---------->
<!----------Menu 17 starts here---------->
<ilayer>
</p>
<layer visibility=show>
<div class=wrap1>
<p align="center">
<span class=wrap2 onClick="dropit(event,
'dropmenu16');event.cancelBubble=true;return false"><font face=Verdana><b>
<a onClick="if(ns4) return dropit(event, 'document.dropmenu16')"
href="alternate.htm">Click here</a></b></font>
</span>
</div>
</layer>
</ilayer><br>
<!----------Menu 17 ends here---------->
<div id=dropmenu0
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu0.style.padding="4px"
for (i=0;i<menu1.length;i++)
document.write(menu1[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu0.captureEvents(Event.CLICK)
document.dropmenu0.onclick=hidemenu
}
</script>
<div id=dropmenu1
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu1.style.padding="4px"
for (i=0;i<menu2.length;i++)
document.write(menu2[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu1.captureEvents(Event.CLICK)
document.dropmenu1.onclick=hidemenu
}
</script>
<div id=dropmenu2
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu2.style.padding="4px"
for (i=0;i<menu3.length;i++)
document.write(menu3[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu2.captureEvents(Event.CLICK)
document.dropmenu2.onclick=hidemenu
}
</script>
<div id=dropmenu3
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu3.style.padding="4px"
for (i=0;i<menu4.length;i++)
document.write(menu4[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu3.captureEvents(Event.CLICK)
document.dropmenu3.onclick=hidemenu
}
</script>
<div id=dropmenu4
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu4.style.padding="4px"
for (i=0;i<menu5.length;i++)
document.write(menu5[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu4.captureEvents(Event.CLICK)
document.dropmenu4.onclick=hidemenu
}
</script>
<div id=dropmenu5
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu5.style.padding="4px"
for (i=0;i<menu6.length;i++)
document.write(menu6[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu5.captureEvents(Event.CLICK)
document.dropmenu5.onclick=hidemenu
}
</script>
<div id=dropmenu6
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu6.style.padding="4px"
for (i=0;i<menu7.length;i++)
document.write(menu7[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu6.captureEvents(Event.CLICK)
document.dropmenu6.onclick=hidemenu
}
</script>
<div id=dropmenu7
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu7.style.padding="4px"
for (i=0;i<menu8.length;i++)
document.write(menu8[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu7.captureEvents(Event.CLICK)
document.dropmenu7.onclick=hidemenu
}
</script>
<div id=dropmenu8
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu8.style.padding="4px"
for (i=0;i<menu9.length;i++)
document.write(menu9[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu8.captureEvents(Event.CLICK)
document.dropmenu8.onclick=hidemenu
}
</script>
<div id=dropmenu9
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu9.style.padding="4px"
for (i=0;i<menu10.length;i++)
document.write(menu10[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu9.captureEvents(Event.CLICK)
document.dropmenu9.onclick=hidemenu
}
</script>
<div id=dropmenu10
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu10.style.padding="4px"
for (i=0;i<menu11.length;i++)
document.write(menu11[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu10.captureEvents(Event.CLICK)
document.dropmenu10.onclick=hidemenu
}
</script>
<div id=dropmenu11
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu11.style.padding="4px"
for (i=0;i<menu12.length;i++)
document.write(menu12[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu11.captureEvents(Event.CLICK)
document.dropmenu11.onclick=hidemenu
}
</script>
<div id=dropmenu12
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu12.style.padding="4px"
for (i=0;i<menu13.length;i++)
document.write(menu13[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu12.captureEvents(Event.CLICK)
document.dropmenu12.onclick=hidemenu
}
</script>
<div id=dropmenu13
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu13.style.padding="4px"
for (i=0;i<menu14.length;i++)
document.write(menu14[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu13.captureEvents(Event.CLICK)
document.dropmenu13.onclick=hidemenu
}
</script>
<div id=dropmenu14
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu14.style.padding="4px"
for (i=0;i<menu15.length;i++)
document.write(menu15[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu14.captureEvents(Event.CLICK)
document.dropmenu14.onclick=hidemenu
}
</script>
<div id=dropmenu15
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu15.style.padding="4px"
for (i=0;i<menu16.length;i++)
document.write(menu16[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu15.captureEvents(Event.CLICK)
document.dropmenu15.onclick=hidemenu
}
</script>
<div id=dropmenu16
style="position:absolute;left:0;top:0;layer-background-color:lightyellow;ba
ckground-color:lightyellow;width:120;visibility:hidden;border:1px solid
black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu16.style.padding="4px"
for (i=0;i<menu17.length;i++)
document.write(menu17[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu16.captureEvents(Event.CLICK)
document.dropmenu16.onclick=hidemenu
}
</script>
Lis
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials