关于div和js的滑块问题:有三个滑块栏目系统设计,研究试验,相关课程当我用鼠标放在(系统设计)时可以出现”内容和标题1“当我用鼠标放在(研究试验)时可以出现”内容和标题2“当我用鼠标放在(相关课程)时可以出现”内容和标题3“错误:
现在我把鼠标放在(相关课程)上时,下面的内容出现”内容和标题3“和”内容和标题2“这是不对的。应该只出现”内容和标题3“才行的。
2.js文件:
<script language="javascript" type="text/javascript">
        function g(m)
        { return document.getElementById(m); }
        
        function HoverLi(n) {
            //如果有N个标签,就将i<=N;
            for (var i = 1; i <=2; i++) {
                //alert(i);
                g('tb_' + i).className = 'normaltab';
                g('tbc_0' + i).className = 'undis';
            }
           // alert(n);
            g('tbc_0' + n).className = 'dis'; 
            g('tb_' + n).className = 'hovertab'; 
           // alert(g('tb_' + n).className);
        }
    </script>3.
css文件为:body {
text-align: left;
margin: 0 ;
font-family:"宋体","Times New Roman", Times, serif;
font-size:12px;
line-height:1.5em;
color:#3A3A3A;

}input {
font: 10pt Verdana, Arial, Helvetica, sans-serif, "宋体";
color: #999;
}
img {
border: none;
}
p,ul,ol,li,form {
margin: 0;
padding: 0;
list-style: none;
list-style-type:none; 
}
a {
color:#3A3A3A;
text-decoration: none;
}
a:hover {
color: #C60000;
text-decoration: underline;
}
.banner{
width:1000px;
margin:auto;
height:166px;
}
.nav{ height:31px; background:url(navbg.jpg) repeat-x; width:850px;  font-size:14px; font-weight:bold; line-height:31px; color:#FFF; padding-left:150px;}
.nav a{ float:left;color:#FFF; padding:0 25px;}
.nav a:hover{ color:#FC6; text-decoration:none;}
.main{
margin-top:15px;
}
.search{ width:800px; height:66px; background:url(searchbg.jpg) repeat-x; border:#FED9AC solid 1px;}
.search_botton1{ background:url(jiansuo.jpg) no-repeat; width:74px; height:24px; border:none;}
.search_botton2{ background:url(gaojijs.jpg) no-repeat; width:74px; height:24px; border:none;}
.r_bigtitle{
height:33px;
background:url(titlebg2.jpg) repeat-x;
width:800px;
margin:14px 0 0 0;
border-bottom:#1D6EC0 2px solid;
}
.xxzy{ width:800px; border:#CCC solid 1px; margin-top:5px; background:url(wxbg.jpg) repeat-x;}
.wx_title{ background:url(r_bg1.jpg) center no-repeat; height:25px; font-size:14px; line-height:25px; text-align: left; color:#FFF; text-indent:40px;}
.wx_list{ line-height:1.8em;}
.wx_list ul{ padding:10px 0 10px 15px;}
.wx_list li{ background:url(arow.jpg) left no-repeat; padding-left:15px;}
.hydt { border:#CCC solid 1px; width:800px; margin-top:10px;}
.hy_title{ background:url(hydt.jpg) no-repeat; height:29px;}
.hy_title span{ width:50px; float:right; font-size:12px;}
.hydtlist{ line-height:1.8em; padding:10px 0px;}
.hydtlist ul{ padding:0px 10px;}
.hydtlist ul li{ width:300px; background:url(bit1.jpg) left no-repeat; padding-left:10px; float:left;}
.rightmain{ width:190px; float:right; background-color:#E6F2FE;}
.right_title{
width:175px;
background:url(titlebg.jpg) repeat-x;
height:27px;
font-size:14px;
font-weight:bold;
color:#FFF;
line-height:27px;
padding-left:15px;
}
.note0{
padding:12px 5px 12px 10px;
line-height:1.8em;
}
.note0 li{ background: url(bit4.jpg) left 4px no-repeat; padding-left:10px;}
.note{
padding:12px 5px 12px 10px;
}
.note li{ background: url(bit2.jpg) left  8px no-repeat; padding-left:10px;}
.zytj{ padding:10px 5px 10px 10px;}
.zytj li{
height:41px;
display:block;
}
.link{ margin: auto;
width:162px;
}
.link_main{line-height:1.8em; padding:10px 0px;}
.link li{ padding-bottom:8px;}
.link a{ display:block;
width:161px;
height:48px;
padding:1px;
background-color:#FFF;
border:#CCC solid 1px;

}
.link a:hover{ border:#09C solid 1px;}
.ts_title{
font-size:14px;
font-weight:bold;
color:#005699;
width: 50%;
}
.ts{ border:#B5E0F3 solid 1px;}.tag{ height:30px;background:url(tag1.jpg);background-repeat: repeat-x;background-color: #E6F2FF;}
.tag a{ width:79px; height:28px; background:url(tag2.jpg) no-repeat; display:block; float:left; margin-left:5px; text-align:center; line-height:2em; font-size:13px; color:#0B5A9F;}/*add contents*/
.tag ul{height:24px; background-repeat: repeat-x;background-color: #E6F2FF;}
.tag li{float:left;height: 24px;line-height:1.9;width: 94px;cursor:pointer;}
.tag a:hover{ background:url(tag1.jpg) no-repeat; font-size:13px; color:#FFF; font-weight:bold; text-align:center; line-height:1.9em; text-decoration:none;}.tag a.current{ background:url(tag1.jpg) no-repeat; font-size:13px; color:#FFF; font-weight:bold; text-align:center; line-height:1.9em;text-decoration:none;}
/*添加的控制显示与隐藏css类*/
.hovertab {font-weight:bold;background-repeat: no-repeat; color:#1F3A87;}
.normaltab {background-repeat: no-repeat; color:#1F3A87; font-weight:bold }
.ts_list{ line-height:1.8em; padding:10px 10px; color:#525252;height:auto;padding:6px;clear:both;border:1px solid #064ca1;border-top:0;text-align:left;}.ts_list li{
padding-left:15px;
background:url(bit3.jpg) left no-repeat;
}
.ts_list a{color:#525252;}
/*添加的控制显示与隐藏css类*/
/*height:auto;*/
/*height:auto;clear:both;border:1px solid #064ca1;border-top:0;text-align:left;*/
 .dis {display:block;}
 .undis{display:none;}.bg_list{ line-height:1.8em; padding:10px 10px; color:#525252;}
.bg_list li{
padding-left:12px;
background:url(bit1.jpg) left center no-repeat;
}
.bg_list a{color:#525252;}
.zhuanti{border:#B5E0F3 solid 1px; width:50%;}
.zt_title{ height:26px; width:100%; background:url(zhuanti.jpg) repeat-x;}
.ztname{ font-size:14px; color:#FFF; font-weight:bold; padding-left:30px; background:url(arrow3.jpg) 13px 8px no-repeat;}
.zt_more a{ color:#FFF;}
.zt{ background:url(ztbg.jpg) bottom repeat-x;}
.ztbook{ background:url(ztbook.jpg) right bottom no-repeat;}
.copy{ background:url(copybg.jpg) repeat-x; height:120px; margin-top:10px;}
.copylink{ width:900px; text-align:center; margin:auto; padding:10px; border-bottom: #CCC dotted 1px; border-top:#E4F1FA solid 1px;}
.copylink a{ color:#0E4B82;}
.copyright{
padding-top:15px;
border-top: #D0EAFD solid 1px;
}
.zb li{ height:25px; }