»
Tiếng AnhTiếng PhápTiếng Việt

In - Menu phân rã - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Trình đơn » Định hướng » Menu phân rã
URL: https://www.javascriptbank.com/navigation-menu-dissolve.html

Menu phân rã © JavaScriptBank.comĐoạn mã này sẽ tạo một menu xuất hiện kiểu 'phân rã' ngay khi người dùng nhấp chuột vào liên kết.

Phiên bản đầy đủ: jsB@nk » Trình đơn » Định hướng » Menu phân rã
URL: https://www.javascriptbank.com/navigation-menu-dissolve.html



CSS
<style><!--#wrapper{position:relative;height:30px}#wrapper2{position:absolute}#coffeemenu03{filter:revealTrans(Duration=1.5,Transition=12)visibility:hide}--></style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script language="JavaScript1.2">var enableeffect=truevar selection=new Array()selection[0]='<font face="ARIAL BLACK"><a href="#">Main Page</a><br>'selection[1]='<a href="#">About Us</a><br>'selection[2]='<a href="#">Java-Script Tutorial</a><br>'selection[3]='<a href="#">Choose Your Font</a><br>'selection[4]='<a href="#">Popular Scripts</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.offsetXcoffeemenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+18if (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"elsedocument.coffeemenu03.visibility="hide"document.coffeemenu03.left=e.pageX-e.layerXdocument.coffeemenu03.top=e.pageY-e.layerY+19return 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><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<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="#"><p>Click Here To Navigate</a></b></font></span><p></span></layer> </ilayer><div id="coffeemenu03"style="position:absolute;left:0;top:0;layer-background-color:#C0C0C0;background-color:#C0C0C0;width:200;visibility:hidden;border:2px solid black;padding:0px"><scriptlanguage="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><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->