<script type="text/javascript">
var oThNodes = document.getElementsByTagName("th");
var divNodes = document.getElementsByTagName("div");
/*鼠标滑进*/
function changeOver(num){
this.num=num;
var oThNode = oThNodes[num];
var divNode = divNodes[num];
name = oThNode.className;//换标题颜色
oThNode.className="over";
divNode.style.display = "block";//打开当前的DIV显示区域条件
for(var x=0;x<3;x++){//关闭其他DIV显示的条件
if(x != num)
divNodes[x].style.display = "none";
}
timerID1 = window.setInterval("addFontHeight(num)",1);//循环增加显示的高度,产生动态效果
}
//展开动态效果
function addFontHeight(num){
var value = 1;
var divNode = divNodes[num];
++value;
if(value>68){
clearInterval(timerID1);
value=1;
divNode.style.height = "70px";
return;
}
divNode.style.height = value+"px";
}
/*鼠标滑出*/
function changeOut(num){
this.num=num;
var oThNode = oThNodes[num];
var divNode = divNodes[num];
oThNode.className = name;//恢复标题原来的颜色
timerID2 = window.setInterval("decFontHeight(num)",1);//循环增加显示的高度,产生动态效果
}
//关闭动态效果
function decFontHeight(num){
var value = 70;
var divNode = divNodes[num];