下拉式导航菜单

下拉式导航菜单
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<style>
<!--
#iewrap{
position:absolute;
height:30px
}
#iewrap2{
position:absolute
}
#dropmenu03{
filter:revealTrans(Duration=1.5,Transition=12)
visibility:hide
}
-->
</style>
<body>
<ilayer id="dropmenu01" height=35px width=35px>
<layer id="dropmenu02" visibility=show>
<span id="iewrap">
<span id="iewrap2" onClick="dropit2();event.cancelBubble=true;return false">
<!--将事件源放在这里 如:<input type="button" value="点 击" /> 或者是下面的“点这里看本站栏目”-->
<font face="宋体"><a href="#">点这里看本站栏目</a></font>
</span>
</span>
</layer>
</ilayer>
<SCRIPT language=javascript><!--
var enableeffect=true
//将如下数组修改成你自己的。
var selection=new Array()
selection[0]='<font face="宋体"><a href=" http://wwww.baidu.com">百度首页</a></font><br>'
selection[1]='<font face="宋体"><a href=" http://wwww.xiaonei.com">校 内 网</a></font><br>'
selection[2]='<font face="宋体"><a href="time3.htm">网上赚钱</a></font><br>'
selection[3]='<font face="宋体"><a href="ye1.htm">免费资源</a></font><br>'
selection[4]='<font face="宋体"><a href="ye2.htm">免费资源</a></font><br>'
selection[5]='<font face="宋体"><a href="ye3.htm">免费资源</a></font><br>'
selection[6]='<font face="宋体"><a href="ye4.htm">免费资源</a></font><br>'
selection[7]='<font face="宋体"><a href="zh5.htm">免费资源</a></font>'
if (document.layers)
document.dropmenu01.document.dropmenu02.visibility='show'
function dropit2(){
if (document.all){
dropmenu03.style.left=document.body.scrollLeft+event.clientX-event.offsetX
dropmenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+18
if (dropmenu03.style.visibility=="hidden"){
if (enableeffect)
dropmenu03.filters.revealTrans.apply()
dropmenu03.style.visibility="visible"
if (enableeffect)
dropmenu03.filters.revealTrans.play()
}
else{
hidemenu()
}
}
}
function dropit(e){
if (document.dropmenu03.visibility=="hide")
document.dropmenu03.visibility="show"
else
document.dropmenu03.visibility="hide"
document.dropmenu03.left=e.pageX-e.layerX
document.dropmenu03.top=e.pageY-e.layerY+19
return false
}
function hidemenu(){
if (enableeffect)
dropmenu03.filters.revealTrans.stop()
dropmenu03.style.visibility="hidden"
}
function hidemenu2(){
document.dropmenu03.visibility="hide"
}
if (document.layers){
document.dropmenu01.document.dropmenu02.captureEvents(Event.CLICK)
document.dropmenu01.document.dropmenu02.onclick=dropit
}
else if (document.all)
document.body.onclick=hidemenu

//-->

</SCRIPT>
<!-- 你可以改变菜单出现的绝对位置和外观风格-->
<div id="dropmenu03" style="position:absolute;left:10;top:0;layer-background-color:seashell;background-color:seashell;width:100;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu03.style.padding='6px'
for (i=0;i<selection.length;i++)
document.write(selection[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu03.captureEvents(Event.CLICK)
document.dropmenu03.onclick=hidemenu2
}
</script>

</body>
</html>
 

你可能感兴趣的:(职场,菜单,导航,休闲)