스크립트 급질문요!

일단 스크립트는..

메뉴 펼침 소스인데요..

이게 문제가...버튼을 클릭을 안했는데....메뉴1-서브메뉴1 서브메뉴2 

이게 자동으로 열려 있네요...

어디를 수정 해야 자동으로 열리지 않을까용..

<script language="javascript">
<!--
function slide(Id, interval, to) {
    var obj = document.getElementById(Id);
    var H, step = 5;

    if (obj == null) return;
    if (to == undefined) { // user clicking
        if (obj._slideStart == true) return;
        if (obj._expand == true) {
            to = 0;
            obj.style.overflow = "hidden";
        } else {
            slide.addId(Id);
            for(var i=0; i < slide.objects.length; i++) {
                if (slide.objects[i].id != Id && slide.objects[i]._expand == true) {
                    slide(slide.objects[i].id);
                }
            }

            obj.style.height = "";
            obj.style.overflow = "";
            obj.style.display = "block";
            to = obj.offsetHeight; // 이거이거
            obj.style.overflow = "hidden";
            obj.style.height = "1px";
        }
        obj._slideStart = true;
    }
   
    step            = ((to > 0) ? 1:-1) * step;
    interval        = ((interval==undefined)?1:interval);

    obj.style.height = (H=((H=(isNaN(H=parseInt(obj.style.height))?0:H))+step<0)?0:H+step)+"px";
   
   
    if (H <= 0) {
        obj.style.display = "none";
        obj.style.overflow = "hidden";
        obj._expand = false;
        obj._slideStart = false;
    } else if (to > 0 && H >= to) {
        obj.style.display = "block";
        obj.style.overflow = "visible";
        obj.style.height = H + "px";
        obj._expand = true;
        obj._slideStart = false;
    } else {
        setTimeout("slide('"+Id+"' , "+interval+", "+to+");", interval);
    }
}
slide.objects = new Array();
slide.addId = function(Id)
{
    for (var i=0; i < slide.objects.length; i++) {
        if (slide.objects[i].id == Id) return true;
    }
    slide.objects[slide.objects.length] = document.getElementById(Id);
}
//-->
</script>

------------------------------------------------------------------------

<tr>
  <td>
  <div class="menu" onClick="slide('sub1');"><img src="../img/menu1-19.gif" name="img12" width="172" height="24" border="0"></div>
  <div id="sub1" class="submenu">
  <div><a href="../introduction/sub12.asp"><img src="../img/menu1-12(o).gif" width="172" height="24" border="0"></a></div>
  <div><a href="../introduction/sub13.asp"><img src="../img/menu1-13(o).gif" width="172" height="24" border="0"></a></div>
  <div><a href="../introduction/sub14.asp"><img src="../img/menu1-14(o).gif" width="172" height="24" border="0"></a></div>
  <div><a href="../introduction/sub15.asp"><img src="../img/menu1-15(o).gif" width="172" height="24" border="0"></a></div>
  <div><a href="../introduction/sub16.asp"><img src="../img/menu1-16(o).gif" width="172" height="24" border="0"></a></div>
  <div><a href="../introduction/sub17.asp"><img src="../img/menu1-17(o).gif" width="172" height="24" border="0"></a></div>
  <div><a href="../introduction/sub18.asp"><img src="../img/menu1-18(o).gif" width="172" height="24" border="0"></a></div>
  </div>
  </td>
 </tr>

입니당;;

|

댓글 8개

[http://sir.co.kr/data/cheditor4/1010/qXFS4pZ3uuJLwYBvWHZpdT.gif]
&#4314;(&#9593;&#9697;&#9593;&#4314; 뿌잉뿌잉
http://datalink.lael.be/temp/123.html
헉.... 같은내용이네요..... 늦어 버렸다... 네이트온에 알려드리는순간 글이 올려왔네요 그리고 전 뒷북 ㅋㅋ
스크립 그대로
<tr>
<td>
<div class="menu" onClick="slide('sub1')"><img src="../img/menu1-19.gif" name="img12" width="172" height="24" border="0"></div>
<div id="sub1" style='display:none' class="submenu">
<div><a href="../introduction/sub12.asp"><img src="../img/menu1-12(o).gif" width="172" height="24" border="0"></a></div>
<div><a href="../introduction/sub13.asp"><img src="../img/menu1-13(o).gif" width="172" height="24" border="0"></a></div>
<div><a href="../introduction/sub14.asp"><img src="../img/menu1-14(o).gif" width="172" height="24" border="0"></a></div>
<div><a href="../introduction/sub15.asp"><img src="../img/menu1-15(o).gif" width="172" height="24" border="0"></a></div>
<div><a href="../introduction/sub16.asp"><img src="../img/menu1-16(o).gif" width="172" height="24" border="0"></a></div>
<div><a href="../introduction/sub17.asp"><img src="../img/menu1-17(o).gif" width="172" height="24" border="0"></a></div>
<div><a href="../introduction/sub18.asp"><img src="../img/menu1-18(o).gif" width="172" height="24" border="0"></a></div>
</div>
</td>
</tr>
<tr>
<td>
<div class="menu" onClick="slide('sub1');"><img src="../img/menu1-19.gif" name="img12" width="172" height="24" border="0"></div>
<div id="sub1" class="submenu" style="display:none;">

이방법은 어떠신가요 ?
같은거잖아요...
저와 멘토님은 그냥 뒷북이죠 ㅋㅋ
전 1분 차이로 뒷북 &#46124;어요 ㅋㅋ
뒷 to the 북이 군요

재가 달때는 배추 님 댓글 밖에 없었어요 ㅠ 0ㅠ;
저두요 ㅋㅋ
댓글을 작성하시려면 로그인이 필요합니다. 로그인

자유게시판

+
제목 글쓴이 날짜 조회
15년 전 조회 1,794
15년 전 조회 2,194
15년 전 조회 2,299
15년 전 조회 1,874
15년 전 조회 2,381
15년 전 조회 2,662
15년 전 조회 2,111
15년 전 조회 1,372
15년 전 조회 2,365
15년 전 조회 1,846
15년 전 조회 1,997
15년 전 조회 1,930
15년 전 조회 2,208
15년 전 조회 2,206
15년 전 조회 2,035
15년 전 조회 1,935
15년 전 조회 2,670
15년 전 조회 4,147
15년 전 조회 2,004
15년 전 조회 1,989
15년 전 조회 1,451
15년 전 조회 2,176
15년 전 조회 1,928
15년 전 조회 1,777
15년 전 조회 2,489
15년 전 조회 1,986
15년 전 조회 2,842
15년 전 조회 1,806
15년 전 조회 2,065
15년 전 조회 1,755
🐛 버그신고