본문 바로가기
셈틀 Com/홈페이지

아래로 펼침메뉴

by 길목 2003. 10. 30.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

<html>

<head>

    <title> Java Script 141 </title>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=euc-kr">

<META NAME="Generator" CONTENT="EditPlus">

<style type="text/css">

    body,table,tr,td    { background-color:#6b6b6b; color: #d5d5d5; font-size: 9pt; font-family:돋움,돋움체; font-weight:bold }

    a:link    { text-decoration: none; color: #d5d5d5 }

    a:visited { text-decoration: none; color: #d5d5d5 }

    a:active  { text-decoration: none; color: #d5d5d5 }

    a:hover   { text-decoration: underline; color: #d5d5d5 }
        

</style>

<script language="javascript">

    var old_menu = '';

    var old_cell = '';

    function menuclick( submenu ,cellbar){

        if( old_menu != submenu ) {

            if( old_menu !='' ) {

                old_menu.style.display = 'none';

            }

                submenu.style.display = 'block';

                old_menu = submenu;

                old_cell = cellbar;

    }

            else {

                submenu.style.display = 'none';

                old_menu = '';

                old_cell = '';

            }

    }

    function view(text) {

        if(text=="") {

            tips.innerText=" 메뉴의 설명문을\n이곳에 기입하세요.";

        }

        else tips.innerText=text;

}

</script>

</head>

<body>

<table border="1" cellpadding="4" cellspacing="0" borderColorDark=#c0c0c0 borderColorLight=#222222  style="position:absolute; left:10; top:10;" >

    <tr>
        <td align="left" style="cursor:hand;">
            <a href="#" target="main"> 독립메뉴 1</a>
        </td>
    </tr>
    <tr>
        <td id="bar1" align="left" onclick="menuclick(submenu1, bar1 );" style="cursor:hand;">
             메인 메뉴 1
        </td>
    </tr>
    <tr>
        <td id="submenu1" style="background:#c0c0c0; margin-left:5; display:none;" align="left">
            <a href="#" target="main">서브 메뉴 1-1</a><br>
            <a href="#" target="main">서브 메뉴 1-2</a><br>
            
        </td>
    </tr>

    <tr>
        <td id="bar2" align="left" onclick="menuclick(submenu2, bar2 );" style="cursor:hand;">
             메인 메뉴 2
        </td>
    </tr>
    <tr>
        <td id="submenu2" style="background:#c0c0c0; margin-left:5; display:none;" align="left" >
            <a href="#" target="main">서브 메뉴 2-1</a><br>
            <a href="#" target="main">서브 메뉴 2-2</a>
        </td>
    </tr>

</table>

</body>

</html>

댓글