tab 탭 전환 효과 구현

1389 단어 tab전환
<title>DIV   </title> 
<script language="JavaScript" type="text/javascript"> 
function ChangeDiv(divId,divName,zDivCount) 
{ 
for(i=0;i<=zDivCount;i++) 
{ 
document.getElementById(divName+i).style.display="none"; 
//         
} 
document.getElementById(divName+divId).style.display="block"; 
//      
} 
</script> 
</head> 
<body> 
<span onMouseOver="ChangeDiv('0','JKDiv_',2)" style="cursor:hand;">   </span> 
<span onMouseOver="ChangeDiv('1','JKDiv_',2)" style="cursor:hand;">   </span> 
<span onMouseOver="ChangeDiv('2','JKDiv_',2)" style="cursor:hand;">   </span> 
<div id="JKDiv_0" style="font-size:14px;margin:10px;color:#FF0000;  border:1px solid red; width:200px; height:200px">       </div> 
<div id="JKDiv_1" style="display:none;font-size:14px;margin:10px;color:#FF0000; border:1px solid red;width:200px; height:200px">       </div> 
<div id="JKDiv_2" style="display:none;font-size:14px;margin:10px;color:#FF0000;">       </div> 
</body> 

좋은 웹페이지 즐겨찾기