急。net中鼠标悬停在一级菜单显示二级菜单但是二级菜单不能显示 求解决
drljw 2013-08-27 04:09:17 脚本代码:
<script type="text/javascript" >
function show2(s) {
document.getElementById(s).style.display = 'block';
}
function show3(s) {
document.getElementById(s).style.display = 'none';
}
</script>
内容代码:
<table width="940" border="0" align="center" cellpadding="0" cellspacing="0">
//一级菜单
<tr>
<td style=" width:83px; height:26px;" align="center" class="biao"><a href="">首页</a></td>
<td style=" width:85px;height:26px;"align="center"class="biao"><a href="">行业资讯</a></td>
<td style=" width:95px;height:26px;"align="center"class="biao"><a href="#" onmouseover="show2(1)" onmouseout="show3(1)" >中药农业</a></td>
<td style=" width:85px;height:26px;"align="center"class="biao"><a href=""onmouseover="show2(2)" onmouseout="show3(2)">中药工业</a></td>
<td style=" width:85px;height:26px;"align="center"class="biao"><a href=""onmouseover="show2(3)" onmouseout="show3(3)">中药商业</a></td>
<td style=" width:85px;height:26px;"align="center"class="biao"><a href=""onmouseover="show2(4)" onmouseout="show3(4)">医疗服务</a></td>
<td style=" width:85px;height:26px;"align="center"class="biao"><a href="">科学研究</a></td>
<td style=" width:78px;height:26px;"align="center"class="biao"><a href="">教育</a></td>
<td style=" width:85px;height:26px;"align="center"class="biao"><a href="">国际合作</a></td>
<td style=" width:85px;height:26px;"align="center"class="biao"><a href=""onmouseover="show2(5)" onmouseout="show3(5)">文献资源</a></td>
<td style=" width:85px;height:26px;"align="center"class="biao"><a href="">电子药店</a></td>
</tr>
<tr>
//二级菜单
<td align="left" style=" width:75px; height:26px;"></td>
<td style=" width:85px;height:26px;" ></td>
<td style=" width:100px;height:10px;" align="center" >
<div id="1" style=" display:none;position:relative;width:100px; border:1;" class="er" >
<p><a href="#">概况</a></p>
<p><a href="#">品种</a></p>
<p><a href="#">供求信息</a></p>
</div></td>
<td style=" width:85px;height:26px;">
<div id="2" style=" display:none;position:relative; "class="er" >
<p><a href="">概况</a></p>
<p><a href="">企业</a></p>
<p><a href="">产品</a></p>
<p><a href="">供求信息</a></p>
</div>
</td>
<td style=" width:85px;height:26px;">
<div id="3" style=" display:none; position:relative;"class="er">
<p><a href="">概况</a></p>
<p><a href="">药品</a></p>
<p><a href="">商品</a></p>
<p><a href="">供求信息</a></p>
</div>
</td>
<td style=" width:85px;height:5px;">
<div id="4" style=" display:none; position:relative;"class="er">
<p><a href="">概况</a></p>
<p><a href="">统计信息</a></p>
</div>
</td>
<td style=" width:85px;height:26px;"></td>
<td style=" width:75px;height:26px;"></td>
<td style=" width:85px;height:26px;"></td>
<td style=" width:85px;height:26px;">
<div id="5" style=" display:none; position:relative;"class="er">
<p><a href="">电子资源</a></p>
<p><a href="">试用资源</a></p>
<p><a href="">免费资源</a></p>
</div></td>
<td style=" width:85px;height:26px;">
</td>
</tr>
</table>