묻고답하기
도저히 상위 메뉴를 추가할 수 가 없네여 ㅠㅠ 주석을 부탁드립니다.
2003.11.20 23:50
메뉴 소스를 수정하려고 하는데 도저히 소스를 어떻게 봐야 할지 모르겠습니다.
상위 메뉴를 추가시키려고 하는데 메뉴 추가를 위한 head 부분의 수정과 body부분의 수정 방법을 중심으로 주석을 좀 달아주세요.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_timelinePlay(tmLnName, myID) { //v1.2
//Copyright 1997, 2000 Macromedia, Inc. All rights reserved.
var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = document.MM_Time[tmLnName];
if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
if (myID == tmLn.ID) { //if Im newest
setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
fNew = ++tmLn.curFrame;
for (i=0; i<tmLn.length; i++) {
sprite = tmLn[i];
if (sprite.charAt(0) == 's') {
if (sprite.obj) {
numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
keyFrm=1;
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr != props.length) {
if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
else sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
} else {
while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
else sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
} } } } }
} else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
if (fNew > tmLn.lastFrame) tmLn.ID = 0;
} }
}
function MM_timelineGoto(tmLnName, fNew, numGotos) { //v2.0
//Copyright 1997, 2000 Macromedia, Inc. All rights reserved.
var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,lastKeyFr,propNum,theObj;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = document.MM_Time[tmLnName];
if (numGotos != null)
if (tmLn.gotoCount == null) tmLn.gotoCount = 1;
else if (tmLn.gotoCount++ >= numGotos) {tmLn.gotoCount=0; return}
jmpFwd = (fNew > tmLn.curFrame);
for (i = 0; i < tmLn.length; i++) {
sprite = (jmpFwd)? tmLn[i] : tmLn[(tmLn.length-1)-i]; //count bkwds if jumping back
if (sprite.charAt(0) == "s") {
numKeyFr = sprite.keyFrames.length;
firstKeyFr = sprite.keyFrames[0];
lastKeyFr = sprite.keyFrames[numKeyFr - 1];
if ((jmpFwd && fNew<firstKeyFr) || (!jmpFwd && lastKeyFr<fNew)) continue; //skip if untouchd
for (keyFrm=1; keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]; keyFrm++);
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr == props.length) propNum = keyFrm-1 //keyframes only
else propNum = Math.min(Math.max(0,fNew-firstKeyFr),props.length-1); //or keep in legal range
if (sprite.obj != null) {
if (props.prop2 == null) sprite.obj[props.prop] = props[propNum];
else sprite.obj[props.prop2][props.prop] = props[propNum];
} }
} else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
}
tmLn.curFrame = fNew;
if (tmLn.ID == 0) eval('MM_timelinePlay(tmLnName)');
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+= 3) if((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style){ obj=obj.style;v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function MM_initTimelines() { //v4.0
//MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
var ns = navigator.appName = = "Netscape";
var ns4 = (ns && parseInt(navigator.appVersion) == 4);
var ns5 = (ns && parseInt(navigator.appVersion) > 4);
document.MM_Time = new Array(4);
document.MM_Time[0] = new Array(1);
document.MM_Time["sub1"] = document.MM_Time[0];
document.MM_Time[0].MM_Name = "sub1";
document.MM_Time[0].fps = 15;
document.MM_Time[0][0] = new String("sprite");
document.MM_Time[0][0].slot = 1;
if (ns4)
document.MM_Time[0][0].obj = document["sub1"];
else if (ns5)
document.MM_Time[0][0].obj = document.getElementById("sub1");
else
document.MM_Time[0][0].obj = document.all ? document.all["sub1"] : null;
document.MM_Time[0][0].keyFrames = new Array(1, 15);
document.MM_Time[0][0].values = new Array(3);
if (ns5)
document.MM_Time[0][0].values[0] = new Array("300px", "300px", "300px", "300px", "300px", "300px", "300px", "300px", "300px", "300px", "300px", "300px", "300px", "300px", "300px");
else
document.MM_Time[0][0].values[0] = new Array(300,300,300,300,300,300,300,300,300,300,300,300,300,300,300);
document.MM_Time[0][0].values[0].prop = "left";
if (ns5)
document.MM_Time[0][0].values[1] = new Array("0px", "2px", "3px", "4px", "6px", "8px", "9px", "11px", "12px", "14px", "15px", "17px", "18px", "20px", "21px");
else
document.MM_Time[0][0].values[1] = new Array(0,2,3,4,6,8,9,11,12,14,15,17,18,20,21);
document.MM_Time[0][0].values[1].prop = "top";
if (!ns4) {
document.MM_Time[0][0].values[0].prop2 = "style";
document.MM_Time[0][0].values[1].prop2 = "style";
}
document.MM_Time[0][0].values[2] = new Array("2","1");
document.MM_Time[0][0].values[2].prop = "zIndex";
if (!ns4)
document.MM_Time[0][0].values[2].prop2 = "style";
document.MM_Time[0].lastFrame = 15;
document.MM_Time[1] = new Array(1);
document.MM_Time["sub2"] = document.MM_Time[1];
document.MM_Time[1].MM_Name = "sub2";
document.MM_Time[1].fps = 15;
document.MM_Time[1][0] = new String("sprite");
document.MM_Time[1][0].slot = 1;
if (ns4)
document.MM_Time[1][0].obj = document["sub2"];
else if (ns5)
document.MM_Time[1][0].obj = document.getElementById("sub2");
else
document.MM_Time[1][0].obj = document.all ? document.all["sub2"] : null;
document.MM_Time[1][0].keyFrames = new Array(1, 15);
document.MM_Time[1][0].values = new Array(2);
if (ns5)
document.MM_Time[1][0].values[0] = new Array("450px", "450px", "450px", "450px", "450px", "450px", "450px", "450px", "450px", "450px", "450px", "450px", "450px", "450px", "450px");
else
document.MM_Time[1][0].values[0] = new Array(450,450,450,450,450,450,450,450,450,450,450,450,450,450,450);
document.MM_Time[1][0].values[0].prop = "left";
if (ns5)
document.MM_Time[1][0].values[1] = new Array("0px", "2px", "3px", "4px", "6px", "8px", "9px", "11px", "12px", "14px", "15px", "17px", "18px", "20px", "21px");
else
document.MM_Time[1][0].values[1] = new Array(0,2,3,4,6,8,9,11,12,14,15,17,18,20,21);
document.MM_Time[1][0].values[1].prop = "top";
if (!ns4) {
document.MM_Time[1][0].values[0].prop2 = "style";
document.MM_Time[1][0].values[1].prop2 = "style";
}
document.MM_Time[1].lastFrame = 15;
document.MM_Time[2] = new Array(1);
document.MM_Time["sub3"] = document.MM_Time[2];
document.MM_Time[2].MM_Name = "sub3";
document.MM_Time[2].fps = 15;
document.MM_Time[2][0] = new String("sprite");
document.MM_Time[2][0].slot = 1;
if (ns4)
document.MM_Time[2][0].obj = document["sub3"];
else if (ns5)
document.MM_Time[2][0].obj = document.getElementById("sub3");
else
document.MM_Time[2][0].obj = document.all ? document.all["sub3"] : null;
document.MM_Time[2][0].keyFrames = new Array(1, 15);
document.MM_Time[2][0].values = new Array(2);
if (ns5)
document.MM_Time[2][0].values[0] = new Array("500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px");
else
document.MM_Time[2][0].values[0] = new Array(500,500,500,500,500,500,500,500,500,500,500,500,500,500,500);
document.MM_Time[2][0].values[0].prop = "left";
if (ns5)
document.MM_Time[2][0].values[1] = new Array("0px", "2px", "3px", "4px", "6px", "8px", "9px", "11px", "12px", "14px", "15px", "17px", "18px", "20px", "21px");
else
document.MM_Time[2][0].values[1] = new Array(0,2,3,4,6,8,9,11,12,14,15,17,18,20,21);
document.MM_Time[2][0].values[1].prop = "top";
if (!ns4) {
document.MM_Time[2][0].values[0].prop2 = "style";
document.MM_Time[2][0].values[1].prop2 = "style";
}
document.MM_Time[2].lastFrame = 15;
document.MM_Time[3] = new Array(1);
document.MM_Time["sub4"] = document.MM_Time[3];
document.MM_Time[3].MM_Name = "sub4";
document.MM_Time[3].fps = 15;
document.MM_Time[3][0] = new String("sprite");
document.MM_Time[3][0].slot = 1;
if (ns4)
document.MM_Time[3][0].obj = document["sub4"];
else if (ns5)
document.MM_Time[3][0].obj = document.getElementById("sub4");
else
document.MM_Time[3][0].obj = document.all ? document.all["sub4"] : null;
document.MM_Time[3][0].keyFrames = new Array(1, 15);
document.MM_Time[3][0].values = new Array(2);
if (ns5)
document.MM_Time[3][0].values[0] = new Array("500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px", "500px");
else
document.MM_Time[3][0].values[0] = new Array(500,500,500,500,500,500,500,500,500,500,500,500,500,500,500);
document.MM_Time[3][0].values[0].prop = "left";
if (ns5)
document.MM_Time[3][0].values[1] = new Array("0px", "2px", "3px", "4px", "6px", "8px", "9px", "11px", "12px", "14px", "15px", "17px", "18px", "20px", "21px");
else
document.MM_Time[3][0].values[1] = new Array(0,2,3,4,6,8,9,11,12,14,15,17,18,20,21);
document.MM_Time[3][0].values[1].prop = "top";
if (!ns4) {
document.MM_Time[3][0].values[0].prop2 = "style";
document.MM_Time[3][0].values[1].prop2 = "style";
}
document.MM_Time[3].lastFrame = 15;
for (i=0; i<document.MM_Time.length; i++) {
document.MM_Time[i].ID = null;
document.MM_Time[i].curFrame = 0;
document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
}
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" onLoad="MM_showHideLayers('sub1','','hide','sub2','','hide','sub3','','hide','sub4','','hide');MM_timelinePlay('sub1');MM_timelinePlay('sub2');MM_timelinePlay('sub3');MM_timelinePlay('sub4')">
<table width="400" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCFF99">
<tr>
<td>sun1-1</td>
<td>sub1-2</td>
<td>sub1-3</td>
<td>sub1-4</td>
</tr>
</table>
<table width="400" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCFF">
<tr>
<td bgcolor="#CCCCFF">sun2-1</td>
<td>sub2-2</td>
<td>sub2-3</td>
<td>sub2-4</td>
</tr>
</table>
<table width="400" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFCCFF">
<tr>
<td>sun3-1</td>
<td>sub3-2</td>
<td>sub3-3</td>
<td>sub3-4</td>
</tr>
</table>
<table width="400" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFCC">
<tr>
<td>sun4-1</td>
<td>sub4-2</td>
<td>sub4-3</td>
<td>sub4-4</td>
</tr>
</table>