2008-12
18
点击链接切换层和鼠标单击切换层代码
作者:桑三 日期:2008-12-18
<script language="javascript" type="text/javascript">
function changeMc(a,b){
document.getElementById(a).style.display = "block"
document.getElementById(b).style.display = "none"
}
</script>
a,b 分别对应下面层的定义中的news_con_0,news_con_1
<div class="lblOn" id="news_lbl_0">
<div class="ggxx" style="font-size: 12px; border: 0 none; margin: 0; padding-left: 0; padding-right: 0; padding-top: 4px; padding-bottom: 0" onmouseover="javascript:changeMc('news_con_0','news_con_1')">
第一个层</a></div>
</div>
<div class="lblOff" id="news_lbl_1">
<div class="xyxw" style="font-size: 12px; border: 0 none; margin: 0; padding-left: 0; padding-right: 0; padding-top: 4px; padding-bottom: 0" onmouseover="javascript:changeMc('news_con_1','news_con_0')">
第2个层</a></div>
<!-- 舌签内容1 begin -->
<div id="news_con_0" style="display: block; font-size: 12px; border: 0 none; margin: 0; padding: 0">
<div class="topnews">
<div>第1个层的内容</div>
</div>
</div>
<!-- 舌签内容1 end --><!-- 舌签内容2 begin -->
<div id="news_con_1" style="display: none; font-size: 12px; border: 0 none; margin: 0; padding: 0">
<div class="topnews">
<div style="padding-top:5px">
第2个层的内容
</div>
</div>
</div>
<!-- 舌签内容2 end -->
评论: 0 | 引用: 0 | 查看次数: -
发表评论