直播中
onmouseover="showmenu(menuwenxue)">menu1</td>
<td height="9" width="100" align=center bgcolor="#33FFFF"
onmouseover="showmenu(menuxuexi)">menu1</td>
<tr>
</table>
<div id="menuwenxue" style="position:absolute; width:90px; height:115px; z-index:1; left: 45px;
top: 75px; visibility: hidden" onmouseout="hidemenu(menuwenxue)">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"
onmouseout="hidemenu(menuwenxue)">
<tr>
<td height="10" class="menufont" onmouseover="showmenu(menuwenxue)"> </td>
</tr>
<tr>
<td height="28" align=center class="menufont" bgcolor=#ff00ff
onmouseover="showmenu(menuwenxue)"><a href="JavaScript:alert('menu1_item1')">menu1_item1</a></td>
</tr>
<tr>
<td height="31" align=center bgcolor=#ff00ff onmouseover="showmenu(menuwenxue)"><a
href="JavaScript:alert('menu1_item2')">menu1_item2</a></td>
</tr>
<tr>
<td height="30" align=center bgcolor=#ff00ff onmouseover="showmenu(menuwenxue)"><a
href="JavaScript:alert('menu1_item3')">menu1_item3</a></td>
</tr>
</table>
</div>
<div id="menuxuexi" style="position:absolute; width:90px; height:115px; z-index:1; left: 140px;
top: 75px; visibility: hidden" onmouseout="hidemenu(menuxuexi)">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"
onmouseout="hidemenu(menuxuexi)">
<tr>
<td height="10" onmouseover="showmenu(menuxuexi)"> </td>
</tr>
<tr>
<td height="27" align=center bgcolor=#ff00ff onmouseover="showmenu(menuxuexi)"><a
href="JavaScript:alert('menu2_item2')">menu2_item1</a></td>
</tr>
<tr>
<td height="31" align=center bgcolor=#ff00ff onmouseover="showmenu(menuxuexi)"><a
href="JavaScript:alert('menu2_item2')">menu2_item2</a></td>
</tr>
<tr>
<td height="30" align=center bgcolor=#ff00ff onmouseover="showmenu(menuxuexi)"><a
href="JavaScript:alert('menu2_item3')">menu2_item3</a></td>
</tr>
</table>
</div>
<Script language="JavaScript">
<!--
var menushow;
function showmenu(menu){
if(menushow)
menushow.style.visibility="hidden"
menushow=menu
menu.style.visibility="visible"
}
function hidemenu(menu){
menu.style.visibility="hidden"
}
function hideshow()
{
if(menushow)
menushow.style.visibility="hidden"
}
-->
</script>
</body>
上面是我從調(diào)試代碼上截下來的,要想得到好看的結(jié)果需要改變一下位子關(guān)系的,當(dāng)然還要注意一下鼠標(biāo)移動時候是否菜單會出現(xiàn)異?,F(xiàn)象的,當(dāng)然這些都可以通過加一些代碼來解決的,主要是鼠標(biāo)移出菜單外,菜單不會消失的,可以在其它的對象截取onmouseover事件來隱藏菜單的!