묻고답하기

http://www.amsachurch.com/index5.html자바스크립트의 강좌란에 올려 주신 Eccen 님의 쏘스를 응용해서,

제 홈페이지를 꾸미려 하는데...

주메뉴에 마우스 온하고 서브 메뉴로 이동하려고 하면,

서브메뉴가 없어집니다...

설정을 무엇인가 바꿔줘야 할것 같은데,

저로서는 힘들더군요...

혹시 아시는 분 계시면 도움 부탁드립니다.

관련 페이지 → http://www.amsachurch.com/index5.html

소스 ↓


<html>

<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>.                                                                                                      </title>
<meta name="generator" content="Namo WebEditor v5.0">
</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p><!-- 메뉴 스크립트 -->
<script>
function showSubMenu(obj) {
        switch(obj) {
                // 메뉴수에 맞추어 case 를 추가해 주시면 됩니다.
                // pWidth 라는 것은 가상적으로 붙여준 이름으로
                // 오른쪽 스크롤바에서 부터 서브레이어의 왼쪽 부분 까지의 길이기를 가리킵니다.
                case 'SubMenu1' : pWidth = 550; break;
                case 'SubMenu2' : pWidth = 465; break;
                case 'SubMenu3' : pWidth = 378; break;
        }
        xPos = document.body.clientWidth - pWidth; // xPos 에 대한 값을 지정하는 부분입니다.
        document.all[obj].style.posLeft = parseInt(xPos);// 여기서 posLeft 를 posRight 로 잡아주시면 다시 왼쪽 정렬이 됩니다.
        document.all[obj].style.visibility = '';
}
function hideSubMenu(obj) {
        document.all[obj].style.visibility = 'hidden';
        }
</script>






<!-- 서브레이어 메뉴 출력 -->

<div id="SubMenu1" style="width:120px; height:200px; position:absolute; left:12px; top:115px; z-index:6; visibility:hidden;" onMouseOver="showSubMenu('SubMenu1')" onMouseout="hideSubMenu('SubMenu1')" > 서브 메뉴 1 내용 </div>

<div id="SubMenu2" style="width:125px; height:18px; position:absolute; left:107px; top:115px; z-index:6; visibility:hidden;" onMouseOver="showSubMenu('SubMenu2')" onMouseout="hideSubMenu('SubMenu2')" > 서브 메뉴 2 내용 </div>

<div id="SubMenu3" style="width:120px; height:200px; position:absolute; left:205px; top:115px; z-index:6; visibility:hidden;" onMouseOver="showSubMenu('SubMenu3')" onMouseout="hideSubMenu('SubMenu3')" > 서브 메뉴 3 내용 </div>



.

                                                                  <!-- 주 메뉴 출력 -->
                             

<a href="링크1" onMouseOver="showSubMenu('SubMenu1')" onMouseout="hideSubMenu('SubMenu1'+ '+ ')" onfocus=blur()><img src=메뉴1이미지 border=0 width=90 height=59 name="image1"></a>

<a href="링크2" onMouseOver="showSubMenu('SubMenu2')" onMouseout="hideSubMenu('SubMenu2')" onfocus=blur()><img src=메뉴2이미지 border=0 width=90 height=59 name="image2"></a>

<a href="링크3" onMouseOver="showSubMenu('SubMenu3')" onMouseout="hideSubMenu('SubMenu3')" onfocus=blur()><img src=메뉴3이미지 border=0 width=90 height=59 name="image3"></a>

<!-- 메뉴 스크립트 -->
<script>
function showSubMenu(obj) {
        switch(obj) {
                // 메뉴수에 맞추어 case 를 추가해 주시면 됩니다.
                // pWidth 라는 것은 가상적으로 붙여준 이름으로
                // 오른쪽 스크롤바에서 부터 서브레이어의 왼쪽 부분 까지의 길이기를 가리킵니다.
                case 'SubMenu1' : pWidth = 550; break;
                case 'SubMenu2' : pWidth = 465; break;
                case 'SubMenu3' : pWidth = 378; break;
        }
        xPos = document.body.clientWidth - pWidth; // xPos 에 대한 값을 지정하는 부분입니다.
        document.all[obj].style.posLeft = parseInt(xPos);// 여기서 posLeft 를 posRight 로 잡아주시면 다시 왼쪽 정렬이 됩니다.
        document.all[obj].style.visibility = '';
}
function hideSubMenu(obj) {
        document.all[obj].style.visibility = 'hidden';
        }
</script></body>

</html>
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
강동호 WinAPM으로 제로보드 설치하는거 이짜나요`~!!! [4] 2007.08.10
국중권 [re] 윈2000에서.. apm 을 설치해서 사용하려고 하는데요~  
난쟁이 윈2000에서.. apm 을 설치해서 사용하려고 하는데요~  
싸리동국 게시판.배경화면.고정시키려면..... [1] 2007.08.10
oasis 이 폰트를 아시는분 있나요? [1] 2007.08.10
김제문 NZEO 게시판의 이미지와 파일이 깨집니다  
강동호 제로보드 설치 햇는데.. 그담엔 뭐어찌하는건가요 ?? [3] 2007.08.10
최정규 회원가입하게 하는거 어떻게 하는거예요? [1] 2007.08.10
양의석 홈페이지 제작시 화면 꽉 채우기 [6] 2007.08.10
강동호 제로보드설치 뒤에 뜨는 그룹추가하는 화면 다시 어떠케 키는가요??  
푸른하늘 제로보드를 설치했는데 그룹추가가 되지 않습니다 ^^;  
영민이 메뉴 소스좀... [4] 2007.08.10
김진아 제로보드가 설치되는 곳이요... [2] 2007.08.10
붉은비가내려™ 그림을 무지개모양으로 하고 싶어요. [3] 2007.08.10
김정석 글씨의 크기... [2] 2007.08.10
bizz 왼쪽 메뉴 소스점.. [1] 2007.08.10
최강남자킹 이런 형태의 index문은 처음보는데요.. 누가 말씀좀.. [3] 2007.08.10
RHJ 혹시 3D MAX에서 만든 3D 물체를 플래시 포맷으로 바꿀수 잇는 방법 아시는분 ^^; [1] 2007.08.10
kimdahye 팝업창에서요.. [1] 2007.08.10
박성일 나모나 그외 플그램으로 인터넷상에서 표가 전선으로 보이게하는방법좀알켜주세요 [2] 2007.08.10