스크립트 급질문요! 정보
스크립트 급질문요!
본문
일단 스크립트는..
메뉴 펼침 소스인데요..
이게 문제가...버튼을 클릭을 안했는데....메뉴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>
입니당;;
댓글 전체

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>
<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분 차이로 뒷북 됬어요 ㅋㅋ
재가 달때는 배추 님 댓글 밖에 없었어요 ㅠ 0ㅠ;