Javascript - Html kodları


Aşağıdaki kodları <head> </head> kodları arasına ekleyin.
{codecitation class="brush: xml; gutter: false;" width="500px"}

<style>
<!--#wrapper{position:relative;height:30px}
#wrapper2{position:absolute}#coffeemenu03{
filter:revealTrans(Duration=1.5,Transition=12)
visibility:hide}--></style>


{/codecitation}


Aşağıdaki kodları <body> kodundan sonra istediğiniz bir yere yapıştırın.

{codecitation class="brush: xml; gutter: false;" width="500px"}
<ilayer id="coffeemenu01" height=35px>
<layer id="coffeemenu02" visibility=show><span id="wrapper">
<span id="wrapper2" onClick="dropit2();event.cancelBubble=true;return false">
<font face="Verdana"><b><a href="/notthisbrowser.html"><font color="#000066"> MENÜ </a></b></font>
</span>
</span>
</layer>
</ilayer>
<script language="JavaScript1.2">
var enableeffect=true
var selection=new Array()
selection[0]='<font face="Verdana"><a href="http://www.gezginler.net"target="_blank"><font color="#00FFFF">Link 0</a><br>'
selection[1]='<a href="http://www.gezginler.net" target="_blank"><font color="#00FFFF">Link 1</a><br>'
selection[2]='<a href="http://www.gezginler.net"target="_blank"><font color="#00FFFF">Link 2</a><br>'
selection[3]='<a href="http://www.gezginler.net"target="_blank"><font color="#00FFFF">Link 3</a><br>'
selection[4]='<a href="http://www.gezginler.net"target="_blank"><font color="#00FFFF">Link 4</a><br></font>'
if (document.layers)
document.coffeemenu01.document.coffeemenu02.visibility='show'
function dropit2(){
if (document.all){
coffeemenu03.style.left=document.body.scrollLeft+event.clientX-event.offsetX
coffeemenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+18
if (coffeemenu03.style.visibility=="hidden"){
if (enableeffect)
coffeemenu03.filters.revealTrans.apply()
coffeemenu03.style.visibility="visible"
if (enableeffect)
coffeemenu03.filters.revealTrans.play()
}
else{
hidemenu()
}
}
}
function dropit(e){
if (document.coffeemenu03.visibility=="hide")
document.coffeemenu03.visibility="show"
else
document.coffeemenu03.visibility="hide"
document.coffeemenu03.left=e.pageX-e.layerX
document.coffeemenu03.top=e.pageY-e.layerY+19
return false
}
function hidemenu(){
if (enableeffect)
coffeemenu03.filters.revealTrans.stop()
coffeemenu03.style.visibility="hidden"
}
function hidemenu2(){
document.coffeemenu03.visibility="hide"
}
if (document.layers){
document.coffeemenu01.document.coffeemenu02.captureEvents(Event.CLICK)
document.coffeemenu01.document.coffeemenu02.onclick=dropit
}
else if (document.all)
document.body.onclick=hidemenu
</script>
<div id="coffeemenu03" style="position:absolute;left:0;top:0;layer-background-color:#red;background-color:#115585;width:200;visibility:hidden;border:3px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
coffeemenu03.style.padding='4px'
for (i=0;i<selection.length;i++)
document.write(selection[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.coffeemenu03.captureEvents(Event.CLICK)
document.coffeemenu03.onclick=hidemenu2
}
</script>

{/codecitation}



Örnek demo için tıklayın >>