TAB切换

   
     <SCRIPT language=JavaScript type=text/javascript>
var arrUrl_1 = new Array("", "");
var arrUrl_2 = new Array("", "");
/*第一种形式 第二种形式 更换显示样式*/
function setTab(name,cursel,n)
{
  for(i=1;i<=n;i++)
  {
   var menu=document.getElementById(name+i);
   var con=document.getElementById("con_"+name+"_"+i);
   menu.className=i==cursel?"hover":"";
   con.style.display=i==cursel?"block":"none";
  }
}
//设置多个Tab切换时的&ldquo;更多&rdquo;URL
function setTabUrl(name,cursel,n,arrUrl)
{
 setTab(name,cursel,n);

}

</SCRIPT>
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<td background="/skin/qingxin/images/zjdht.jpg">
<DIV class="dhn" >
<LI id=Three1 onMouseOver="setTabUrl('Three',1,3,arrUrl_1)">TAB1</LI>
<LI id=Three2 onMouseOver="setTabUrl('Three',2,3,arrUrl_1)">TAB2</LI>
<LI id=Three3 onMouseOver="setTabUrl('Three',3,3,arrUrl_1)">TAB3</LI>

</DIV>

</td>
</tr></table >

 

 

 

 

 


<DIV  id=con_Three_1  align="left" class="xw">

TAB1内容
</DIV>

 


<DIV  id=con_Three_2 style="DISPLAY: none"  align="left" class="xw">

 

TAB2内容2

</DIV>

 


<DIV id=con_Three_3 style="DISPLAY: none" align="left" class="xw" >

TAB3内容

</DIV>

你可能感兴趣的:(JavaScript,Class,div,border,menu)