인터넷정보

간단한 서브 토글 메뉴

알 수 없는 사용자 2007. 10. 17. 18:15


<HTML>
<HEAD>
<TITLE>토글서브메뉴</TITLE>


<SCRIPT LANGUAGE=JAVASCRIPT>
<!--
function toggleMenu(simpleMenu)
{
if (document.all)
{
if (simpleMenu == "menu1")
{
eval(document.all.menu1.style).display = "block"
eval(document.all.menu2.style).display = "none"
eval(document.all.menu3.style).display = "none"
eval(document.all.menu4.style).display = "none" 
}
else if(simpleMenu == "menu2")
{
eval(document.all.menu1.style).display = "none"
eval(document.all.menu2.style).display = "block"
eval(document.all.menu3.style).display = "none"
eval(document.all.menu4.style).display = "none" 
}
else if(simpleMenu == "menu3")
{
eval(document.all.menu1.style).display = "none"
eval(document.all.menu2.style).display = "none"
eval(document.all.menu3.style).display = "block"
eval(document.all.menu4.style).display = "none" 
}
else
{
eval(document.all.menu1.style).display = "none"
eval(document.all.menu2.style).display = "none"
eval(document.all.menu3.style).display = "none"
eval(document.all.menu4.style).display = "block" 
}


return false
}
else
{
return true
}
}
-->
</SCRIPT>


<STYLE TYPE="TEXT/CSS">
#menu1 {display:none; margin-left:15px}
#menu2 {display:none; margin-left:15px}
#menu3 {display:none; margin-left:15px}
#menu4 {display:none; margin-left:15px}
td { font-size: 9pt; line-height: 13pt; text-decoration: none}
a { text-decoration: none; color: #a09070}
</STYLE>


</HEAD>


<BODY BGCOLOR="#FFFFFF">


<table border=0 cellpadding="0" cellspacing="5">
<tr>
<td>
<A HREF="#" onClick="return toggleMenu('menu1')" onfocus="this.blur()"><b>첫번째메뉴</b></A><br>
<SPAN ID="menu1">
<a href="#">첫번째메뉴0</a><br>
<a href="#">첫번째메뉴1</a><br>
<a href="#">첫번째메뉴2</a><br>
<a href="#">첫번째메뉴3</a><br>
</SPAN>
<A HREF="#" onClick="return toggleMenu('menu2')" onfocus="this.blur()"><b>두번째메뉴</b></A><br>
<SPAN ID="menu2">
<a href="#">두번째메뉴0</a><br>
<a href="#">두번째메뉴1</a><br>
<a href="#">두번째메뉴2</a><br>
<a href="#">두번째메뉴3</a><br>
</SPAN>
<A HREF="#" onClick="return toggleMenu('menu3')" onfocus="this.blur()"><b>세번째메뉴</b></A><br>
<SPAN ID="menu3">
<a href="#">세번째메뉴0</a><br>
<a href="#">세번째메뉴1</a><br>
<a href="#">세번째메뉴2</a><br>
<a href="#">세번째메뉴3</a><br>
</SPAN>
<A HREF="#" onClick="return toggleMenu('menu4')" onfocus="this.blur()"><b>네번째메뉴</b></A>
<SPAN ID="menu4">
<a href="#">네번째메뉴0</a><br>
<a href="#">네번째메뉴1</a><br>
<a href="#">네번째메뉴2</a><br>
<a href="#">네번째메뉴3</a><br>
</SPAN>

</td>
</tr>
</table>
</BODY>
</HTML>

- 펌 - http://suldo.zotta.net/

반응형