请高手们帮个忙,急~!~! 我想问一下有谁会做就像这个论坛上面的那个下拉菜单,当鼠标放上去就出现下拉菜单. 哪位高手如果会的话,可不可以把代码发给我,或者做个例子然后发给我,小弟感激不尽, 我的QQ:350806261 |
不知下面这个合不合你意 <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE></TITLE> <FONT face=宋体> <style type="text/css"> #menuBar {position: absolute; left: 0; top: 0; width: 100%; height: 22px; border: 1px solid #99ffff; background-color: #99ffff; layer-background-color: #99ffff;
} .daMenu { position: absolute;
width: 100px; height: 22px; border: 1px solid #99ffff; top: 0px } .moreMenu { position: absolute;
width: 100px;
border: 1px solid red;
background-color: red;
layer-background-color: red;
top: 22px; visibility:hidden;
}
.itemAnchor { fontcolor: yellow;
}
</style> <script language='javascript'> var dalast; function barTog(div_name) { if (document.all(div_name).style.visibility=='visible') document.all(div_name).style.visibility='hidden'; else document.all(div_name).style.visibility='visible'; lastMenu=document.all(div_name).style; } lastItem="aaron"; function menuItem(item) { dalast=document.all(lastItem).style; daItem=document.all(item).style; dalast.visibility='hidden'; daItem.visibility='visible'; lastMenu.visibility='hidden'; lastItem=item; } </script>
</HEAD> <BODY> <div id="menuBar" class="menuBar"> </div> <div id="webmonkey" class="daMenu"> <a href="#" class="itemAnchor" onclick="javascript:barTog('moreMonkey');return false;"> Webmonkey </a> </div> <div id="moreMonkey" class="moreMenu"> <a href="#" class="itemAnchor" onclick="menuItem('aaron');return false"> Aaron </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('kristin');return false"> Captain?Cursor </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('tim');return false"> Cassandra </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('taylor');return false"> Chris </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('aaron');return false"> Courtney </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('tim');return false"> Jeff </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('kristin');return false"> Joanne </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('taylor');return false"> Jean Pierre </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('aaron');return false"> Klug </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('tim');return false"> Kristin </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('kristin');return false"> Nadav </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('taylor');return false"> Taylor </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('aaron');return false"> Thau </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('tim');return false"> Tim </a> <br> <a href="#" class="itemAnchor" onclick="menuItem('kristin');return false"> Wendy </a> <br>
</div>
<div id="kristin" style="position:absolute; left:176px; top:293px; width:36px; height:49px; z-index:9;visibility:hidden"> <dd><span class="monkeyContainer"><img src="kristin.gif" width="42" height="67"> </span></dd> </div> <div id="tim" style="position:absolute; left:230px; top:281px; width:40px; height:70px; z-index:8;visibility:hidden"> <dd><span class="monkeyContainer"><img src="tim01.gif" width="41" height="79"> </span></dd> </div> <div id="aaron" style="position:absolute; left:270px; top:289px; width:24px; height:14px; z-index:7;visibility:hidden"> <dd><span class="monkeyContainer"><img src="aaron.gif" width="40" height="71"> </span></dd> </div> <div id="taylor" style="position:absolute; left:260px; top:276px; width:34px; height:42px; z-index:6;visibility:hidden"> <dd><span class="monkeyContainer"><img src="taylor.gif" width="43" height="67"> </span></dd> </div>
<P></P>
</BODY> </HTML>