各位老大,我从网上剥了一个TAB切换的代码,可是,它却是自动切换,我不想要自动的,就想用悬浮切换效果
怎么样改动呢,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<SCRIPT language=JavaScript type=text/javascript>
function setTab(/*string*/name,/*int*/ itemCnt,/*int*/ curItem, /**/classHide, /**/classShow)
{
for(i=1;i<=itemCnt;i++)
{
eval("document.getElementById('tab_" + name + "_" + i + "').className='" + classHide + "'");
}
eval("document.getElementById('tab_" + name + "_" + curItem + "').className='" + classShow + "'");
for(i=1;i<=itemCnt;i++)
{
eval("ele_hide = document.getElementById('con_" + name + "_" + i +"')");
if(ele_hide) ele_hide.style.display = "none";
}
eval("ele_play = document.getElementById('con_" + name + "_" + curItem + "')");
if(ele_play) ele_play.style.display = "block";
}
</SCRIPT>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<div id="title" class="clearfix">
<ul>
<li id="tab_tophome_1" class=a2><a href="#" onmousemove="startIndex=1;setTab('tophome',4,1,'a1','a2');"><img src="img/tag1.gif" width="16" height="16" /> 备课组资料</a></li>
<li id="tab_tophome_2" class=a1><a href="#" onmousemove="startIndex=2;setTab('tophome',4,2,'a1','a2');"><img src="img/tag2.gif" width="16" height="16" /> 教研组资料</a></li>
<li id="tab_tophome_3" class=a1><a href="#" onmousemove="startIndex=3;setTab('tophome',4,3,'a1','a2');"><img src="img/tag3.gif" width="16" height="16" /> 教师个人资料</a></li>
<li id="tab_tophome_4" class=a1><a href="#" onmousemove="startIndex=4;setTab('tophome',4,4,'a1','a2');"><img src="img/tag4.gif" width="16" height="16" /> 校政策性文件</a></li>
</ul>
<div class="clear"></div>
</div>
------解决方案--------------------
onmousemove 改为 onmouseover