<style>
/*对点击下栏显现边框的代码进行美化*/
div.hackBox{
display:none;
}
</style>
<script>
function switchTab(cardBar,cardId){
document.getElementById(cardId).className="Selected";
//读出cardContent 下面的一切div标签
var dvs=document.getElementById("cardContent").getElementsByTagName("div");
//循环,判别应该显现的div
for (i=0;i<dvs.length;i++ ){
if (dvs[i].id==("D"+cardId)){
dvs[i].style.display="block";
}else{
dvs[i].style.display="none";
}
}
}
</script>
<BODY>
<table width="950" border="0" id="cardBar">
<tr>
<td id="card0"><a href="#" onMouseOver="javascript:switchTab('cardBar','card0');">栏目</a></td>
<td id="card1"><a href="#" onMouseOver="javascript:switchTab('cardBar','card1');">栏目</a></td>
<td id="card2"><a href="#" onMouseOver="javascript:switchTab('cardBar','card2');">栏目</a></td>
<td id="card3"><a href="#" onMouseOver="javascript:switchTab('cardBar','card3');">栏目</a></td>
<td id="card4"><a href="#" onMouseOver="javascript:switchTab('cardBar','card4');">栏目</a></td>
<td id="card5"><a href="#" onMouseOver="javascript:switchTab('cardBar','card5');">栏目</a></td>
<td id="card6"><a href="#" onMouseOver="javascript:switchTab('cardBar','card6');">栏目</a></td>
<td id="card7"><a href="#" onMouseOver="javascript:switchTab('cardBar','card7');">栏目</a></td>
<td id="card8"><a href="#" onMouseOver="javascript:switchTab('cardBar','card8');">栏目</a></td>
<td id="card9"><a href="#" onMouseOver="javascript:switchTab('cardBar','card9');">栏目</a></td>
<td id="card10"><a href="#" onMouseOver="javascript:switchTab('cardBar','card10');">栏目</a></td>
</tr>
</table>
<table width="974" border="0" height="30" bgcolor="#E3C9CA" align="center" id="cardContent">
<tr>
<td align="center">
<div id="Dcard0" class="hackBox">文字衔接0</div>
<div id="Dcard1" class="hackBox">文字衔接1</div>
<div id="Dcard2" class="hackBox">文字衔接2</div>
<div id="Dcard3" class="hackBox">文字衔接3</div>
<div id="Dcard4" class="hackBox">文字衔接4</div>
<div id="Dcard5" class="hackBox">文字衔接5</div>
<div id="Dcard6" class="hackBox">文字衔接6</div>
<div id="Dcard7" class="hackBox">文字衔接7</div>
<div id="Dcard8" class="hackBox">文字衔接8</div>
<div id="Dcard9" class="hackBox">文字衔接9</div>
<div id="Dcard10" class="hackBox">文字衔接10</div>
</td>
</tr>
</table>
</BODY>
</HTML>
声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!
原文地址:鼠标滑过一级栏目,出现二级栏目的代码发布于2023-02-04 02:37:54