广告载入中
  所在位置:网站首页 -> 网络学院 -> JSP -> JSP基础 -> 一个简单的JS菜单
我要发言 发起投票 发起交易 任务悬赏 回复话题              

一个简单的JS菜单

时间:2007-12-6 21:32:28 作者: 安蕾 短消息 收藏 编辑 删除
广告载入中
广告载入中
广告载入中

head中写入如下脚本

<script language="javascript" type="text/javascript">

function showmenu(i)
{
for(var j=1;j<=6;j )
{
if(j==i)
{
eval("dv" j).style.display = "block";
}
else
{
eval("dv" j).style.display = "none";
}
}
}
function hidden(obj)
{
obj.style.display = "none";
}
function setFontColor(obj)
{
obj.style.color="#ff3300";

}
function reSetColor(obj)
{
obj.style.color="#58595b";
}

</script>

在 body 中写下如下内容

<table width="100%">
<tr>


<td>
<table width="100%">
<tr>
<th onmouseover="showmenu(1)">新建订单</th><th onmouseover="showmenu(2)">确认订单</th><th onmouseover="showmenu(3)">审核订单</th><th onmouseover="showmenu(4)">夜审</th><th onmouseover="showmenu(5)">出票</th><th onmouseover="showmenu(6)">结算</th>
</tr>
</table>
</td>
</tr>
<tr>


<td id="chmenu" background="scrollingback.gif" style="height: 39px">
<div id="dv1" style=" display:none;" onmouseover="showmenu(1)" onmouseout="hidden(this)">
<table>
<tr>
<td style="width: 70px;text-align:center">
<a href="../FrameWork/booking/newbooking.aspx" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">酒店订单</a>
</td>
<td style="width: 70px;text-align:center">


<a href="../FrameWork/booking/airticket/newbooking.aspx" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">机票订单</a></td>


<td style="width: 70px;text-align:center">
<a onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">景点订单</a>
</td>
</tr>
</table>
</div>
<div id="dv2" style="position:absolute; top:53px; left:355px; height: 39px; display:none;" onmouseover="showmenu(2)" onmouseout="hidden(this)">


<table>
<tr>
<td style="width: 70px;text-align:center">
<a href="../sys_BookingMessage/querorder.aspx?type=1&state=1" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">酒店订单</a>
</td>
<td style="width: 70px;text-align:center">
<a href="../sys_BookingMessage/qflight.aspx?type=6&state=1" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">机票订单</a>


</td>
<td style="width: 70px;text-align:center">
<a onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">景点订单</a>
</td>
</tr>
</table>
</div>
<div id="dv3" style="position:absolute; left: 432px; width: 268px; top: 53px; display:none;" onmouseover="showmenu(3)" onmouseout="hidden(this)">


<table>
<tr>
<td style="width: 70px;text-align:center">
<a href="../sys_BookingMessage/querorder.aspx?type=1&state=2" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">酒店订单</a>
</td>
<td style="width: 70px;text-align:center">
<a href="../sys_BookingMessage/qflight.aspx?type=6&state=1" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">机票订单</a>


</td>
<td style="width: 70px;text-align:center">
<a onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">景点订单</a>
</td>
</tr>
</table>
</div>
<div id="dv4" style="position:absolute; left: 570px; width: 268px; top: 53px; display:none;" onmouseover="showmenu(4)" onmouseout="hidden(this)">


<table>
<tr>
<td style="width: 70px;text-align:center">
<a href="../sys_BookingMessage/querorder.aspx?type=1&state=3" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">入住夜审</a>
</td>
<td style="width: 70px;text-align:center">
<a href="../sys_BookingMessage/querorder.aspx?type=1&state=4" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">离店夜审</a>


</td>
</tr>
</table>
</div>
<div id="dv5" style="position:absolute; left: 670px; width: 268px; top: 53px; display:none;" onmouseover="showmenu(5)" onmouseout="hidden(this)">
<table>
<tr>
<td style="width: 70px;text-align:center">


<a href="../sys_BookingMessage/qflight.aspx?type=6&state=2" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">机票订单</a>
</td>
</tr>
</table>
</div>
<div id="dv6" style="position:absolute; left: 600px; width: 268px; top: 53px; display:none;" onmouseover="showmenu(6)" onmouseout="hidden(this)">
<table>
<tr>


<td style="width: 70px;text-align:center">
<a href="../sys_BookingMessage/querorder.aspx?type=1&state=7" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">酒店订单</a>
</td>
<td style="width: 70px;text-align:center">
<a href="../sys_BookingMessage/qflight.aspx?type=6&state=4" onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">机票订单</a>
</td>
<td style="width: 70px;text-align:center">


<a onmouseover="setFontColor(this)" onmouseout="reSetColor(this)" style="cursor:pointer" target="main">景点订单</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

广告载入中

看看评论

快速回复

  • 支持UBB,HTML标签


  • 高级回复
  • 广告载入中
      
    操作选项: 加精 解精 奖惩 设专题 设公告 解公告 固顶 总固顶 解固顶 结帖 解结帖 锁帖 解锁 移帖 删帖   
    看看456-学习娱乐在线门户.致力为一切由互联网接入本站的朋友们,倾情打造一片学习娱乐新时空!
    Copyright ? 2007-2009 www.kankan456.com online services. All rights reserved. 浙ICP备07003587号
    欢迎您在看看发布各类原创作品和讨论话题,您的支持是“看看456”前进的基石