球高手把这段滑动门JS代码改为自动切换
<scriptlanguage="javascript"type="text/javascript"><!--functionsecBoard(elementID,lis...
<script language="javascript" type="text/javascript">
<!--
function secBoard(elementID,listName,n) {
var elem = document.getElementById(elementID);
var elemlist = elem.getElementsByTagName("H6");
for (var i=0; i<elemlist .length; i++) {
elemlist[i].className = "normal";
var m = i+1;
document.getElementById(listName+"_"+m).className = "normal";
}
elemlist[n-1].className = "current";
document.getElementById(listName+"_"+n).className = "current";
}
-->
</script>
<div class="sy4_gd color_fff">
<div class="sy4_gd_content">
<div class="current" id="ppslist_1">
内容
</div>
<div class="normal" id="ppslist_2">
内容
</div>
</div>
<div class="sy4_gd_header yc" id="sy4_gd_caption">
<H6 class="current"><a class="sy4_gd_nav_001" onmousemove="secBoard('sy4_gd_caption','ppslist',1);"></a></h6>
<H6 class="normal"><a class="sy4_gd_nav_002" onmousemove="secBoard('sy4_gd_caption','ppslist',2);"></a></h6>
</div>
<!--picc_content end-->
</div>
现在的效果是感应切换的,,,,求改为自动切换,,,标题字写错见谅 展开
<!--
function secBoard(elementID,listName,n) {
var elem = document.getElementById(elementID);
var elemlist = elem.getElementsByTagName("H6");
for (var i=0; i<elemlist .length; i++) {
elemlist[i].className = "normal";
var m = i+1;
document.getElementById(listName+"_"+m).className = "normal";
}
elemlist[n-1].className = "current";
document.getElementById(listName+"_"+n).className = "current";
}
-->
</script>
<div class="sy4_gd color_fff">
<div class="sy4_gd_content">
<div class="current" id="ppslist_1">
内容
</div>
<div class="normal" id="ppslist_2">
内容
</div>
</div>
<div class="sy4_gd_header yc" id="sy4_gd_caption">
<H6 class="current"><a class="sy4_gd_nav_001" onmousemove="secBoard('sy4_gd_caption','ppslist',1);"></a></h6>
<H6 class="normal"><a class="sy4_gd_nav_002" onmousemove="secBoard('sy4_gd_caption','ppslist',2);"></a></h6>
</div>
<!--picc_content end-->
</div>
现在的效果是感应切换的,,,,求改为自动切换,,,标题字写错见谅 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询