뺑뺑이 탭메뉴
뺑뺑이 탭메뉴입니다.
메뉴1->메뉴2-메뉴3->메뉴1 로 누를때마다 돕니다.
스트립트에서 (i=1; i<=3; i++) 요기 숫자 3을 원하는 수량으로 바꾸시고
<div>~</div>를 수량만큼 더 만들어서 사용하면 됩니다.
<div style="DISPLAY: block" id=menu1>
<table width=100% height=100% border="0" cellpadding="0" cellspacing="0" style="cursor:pointer;cursor:hand;" onclick=BB(2)>
<tr>
<td>내용1</td>
</tr>
</table>
</div>
<div style="DISPLAY: none" id=menu2>
<table width=100% height=100% border="0" cellpadding="0" cellspacing="0" style="cursor:pointer;cursor:hand;" onclick=BB(3)>
<tr>
<td>내용2</td>
</tr>
</table>
</div>
<div style="DISPLAY: none" id=menu3>
<table width=100% height=100% border="0" cellpadding="0" cellspacing="0" style="cursor:pointer;cursor:hand;" onclick=BB(1)>
<tr>
<td>내용3</td>
</tr>
</table>
</div>
<script type="text/javascript">
function BB(index) {
for (i=1; i<=3; i++) {
var tmpMenu = document.getElementById("menu"+i);
if( typeof(tmp)!='undefinded' ) {
if (index == i)
tmpMenu.style.display = "block";
else
tmpMenu.style.display = "none";
}
}
}
</script>
메뉴1->메뉴2-메뉴3->메뉴1 로 누를때마다 돕니다.
스트립트에서 (i=1; i<=3; i++) 요기 숫자 3을 원하는 수량으로 바꾸시고
<div>~</div>를 수량만큼 더 만들어서 사용하면 됩니다.
<div style="DISPLAY: block" id=menu1>
<table width=100% height=100% border="0" cellpadding="0" cellspacing="0" style="cursor:pointer;cursor:hand;" onclick=BB(2)>
<tr>
<td>내용1</td>
</tr>
</table>
</div>
<div style="DISPLAY: none" id=menu2>
<table width=100% height=100% border="0" cellpadding="0" cellspacing="0" style="cursor:pointer;cursor:hand;" onclick=BB(3)>
<tr>
<td>내용2</td>
</tr>
</table>
</div>
<div style="DISPLAY: none" id=menu3>
<table width=100% height=100% border="0" cellpadding="0" cellspacing="0" style="cursor:pointer;cursor:hand;" onclick=BB(1)>
<tr>
<td>내용3</td>
</tr>
</table>
</div>
<script type="text/javascript">
function BB(index) {
for (i=1; i<=3; i++) {
var tmpMenu = document.getElementById("menu"+i);
if( typeof(tmp)!='undefinded' ) {
if (index == i)
tmpMenu.style.display = "block";
else
tmpMenu.style.display = "none";
}
}
}
</script>
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 5개
(그런데 무슨말씀이시죠? ;;;)