한국어
<!-- 把如下代码加入<body>区域中 --> <!-- 웹 http://www.downcodes.com --> <!-- bbs http://www.downcodes.com/bbs- -> <style rel=stylesheet type=text/css> BODY { 테두리-하단: 0px; 테두리-왼쪽: 0px; 테두리 오른쪽: 0px; 테두리 상단: 0px; 여백: 0px; 색상: 버튼텍스트 } #menu { 배경: 버튼페이스; 테두리-하단: 버튼면 1px 솔리드; BORDER-LEFT: 버튼면 1px 솔리드; BORDER-RIGHT: 버튼면 1px 솔리드; BORDER-TOP: 버튼면 1px 솔리드; 커서: 기본값; 왼쪽: 0px; 위치: 절대; TOP: 0px } #menu .menu { 배경: 버튼페이스; BORDER-BOTTOM: 버튼 강조 표시 2px 시작; BORDER-LEFT: 버튼 강조 표시 2px 시작; BORDER-RIGHT: 버튼 강조 표시 2px 시작; BORDER-TOP: 버튼 강조 표시 2px 시작; 위치: 절대 } #menu TD { FONT: 메뉴; HEIGHT: 20px } #menu .root { BORDER-BOTTOM: 버튼면 1px solid; BORDER-LEFT: 버튼면 1px 솔리드; BORDER-RIGHT: 버튼면 1px 솔리드; BORDER-TOP: 버튼면 1px 솔리드; 여백: 6px; 패딩 하단: 1px; 패딩-왼쪽: 7px; 패딩-오른쪽: 7px; PADDING-TOP: 1px } #menu .icon { TEXT-ALIGN: center } #menu .disabled { COLOR: 버튼 섀도우 } #menu .more { FONT-FAMILY: webdings; TEXT-ALIGN: 오른쪽; 너비: 20px } #menu #handle { 테두리-하단: 버튼 그림자 1px 솔리드; BORDER-LEFT: 버튼 강조 표시 1px 솔리드; 테두리 오른쪽: 버튼 그림자 1px 솔리드; BORDER-TOP: 버튼 강조 표시 1px 솔리드; 커서: 이동; 여백: 0px; 패딩 하단: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px } #outerDiv { BORDER-BOTTOM: 흰색 2px 삽입; 테두리-왼쪽: 흰색 2px 삽입; BORDER-RIGHT: 흰색 2px 삽입; BORDER-TOP: 흰색 2px 삽입; 높이: 90%; 오버플로: 자동; 위치: 절대; 너비: 100%; Z-INDEX: -1 } </style> <SCRIPT> var activeMenu = null; var activeSub = null; var 온도엘; var t; var hideWindowedControls = true; var ie5 = (document.getElementsByTagName != null); function menuItemHighlight(el) { el.style.Background = "하이라이트"; el.style.color = "highlighttext"; } function menuItemNormal(el) { el.style.Background = ""; el.style.color = ""; } function raiseButton(el) { el.style.borderTop ="1개의 단색 버튼하이라이트"; el.style.borderLeft ="1개의 단색 버튼 강조 표시"; el.style.borderBottom ="1개의 단색 버튼섀도우"; el.style.borderRight ="1개의 단색 버튼섀도우"; el.style.padding="1"; el.style.paddingLeft = "7"; el.style.paddingRight = "7"; } function NormalButton(el) { el.style.border = "단색 버튼면 1개"; el.style.padding="1"; el.style.paddingLeft = "7"; el.style.paddingRight = "7"; } functionpressedButton(el) { el.style.borderTop ="1개의 단색 버튼섀도우"; el.style.paddingTop = "2"; el.style.borderLeft ="1개의 단색 버튼섀도우"; el.style.paddingLeft = "8"; el.style.borderBottom ="1개의 솔리드 버튼하이라이트"; el.style.paddingBottom= "0"; el.style.borderRight = "단색 버튼 강조 표시 1개"; el.style.paddingRight = "6"; } function cleanUpMenuBar() { for (i=0; i <menu.rows.length; i++) { for (j=0; j <menu.rows(i).cells.length; j++) { if (menu.rows (i).cells(j).className == "root") { NormalButton(menu.rows(i).cells(j)); } } } showWindowedObjects(true); } 함수 getMenuItem(el) { temp = el; while ((temp!=null) && (temp.tagName!="TABLE") && (temp.id!="menubar") && (temp.id!="menu") && (temp.id!="handle ")) { if ((temp.tagName=="TR") || (temp.className=="root")) el = temp; 온도 = temp.parentElement; } 엘을 반환; } 함수 getSub(el) { temp = el; while ((temp!=null) && (temp.className != "sub")) { if (temp.tagName=="TABLE") el = temp; 온도 = temp.parentElement; } 엘을 반환; } function menuClick() { if (event.srcElement == null) return; var el=getMenuItem(event.srcElement); if ((el.className != "disabled") && (el.id != "menubar")){ if (el.className == "root") { if (activeMenu) { raiseButton(el); showWindowedObjects(true); } elsepressedButton(el); 토글메뉴(el); } else if (el.href) { cleanUpMenuBar(); if (activeMenu)ggleMenu(activeMenu.parentElement); if (el.target) window.open(el.href, el.target); else if (document.all.tags("BASE").item(0) != null) window.open(el.href, document.all.tags("BASE").item(0).target); 그렇지 않으면 window.location = el.href; } } window.event.cancelBubble = true; } 함수 복원() { if (activeMenu) { 토글메뉴(activeMenu.parentElement); cleanUpMenuBar(); } } document.onclick=복원; function menuOver() { if ((event.fromElement == null) || (event.toElement == null) || (event.fromElement == event.toElement)) return; var fromEl = getMenuItem(event.fromElement); var toEl = getMenuItem(event.toElement); if (fromEl == toEl) 반환; if ((toEl.className != "disabled") && (toEl.id != "menubar")){ if (toEl.className == "root") { if (activeMenu) { if (toEl.menu != activeMenu ) { cleanUpMenuBar(); pressedButton(toEl); 토글메뉴(toEl); } } else { raiseButton(toEl); } } else { if ((fromEl != toEl) && (toEl.tagName != "TABLE")){ cleanup(toEl.parentElement.parentElement, false); menuItemHighlight(toEl); toEl.parentElement.parentElement.activeItem = toEl; if (toEl.href) window.status = toEl.href; if (toEl.className == "sub") showSubMenu(toEl,true); } } } } function menuOut() { if ((event.fromElement == null) || (event.toElement == null) || (event.fromElement == event.toElement)) return; var fromEl = getMenuItem(event.fromElement); var toEl = getMenuItem(event.toElement); if (fromEl == toEl) 반환; if (fromEl.className == "root"){ if (activeMenu) { if (fromEl.menu != activeMenu) NormalButton(fromEl); } else NormalButton(fromEl); } else { if ((fromEl.className != "disabled") && (fromEl.id != "menubar")){ if ((fromEl.className == "sub") && (getSub(toEl) == fromEl. subMenu) || (fromEl.subMenu == toEl.parentElement.parentElement)) return; else if ((fromEl.className == "sub")){ cleanup(fromEl.subMenu, true); menuItemNormal(fromEl); } else if ((fromEl != toEl) && (fromEl.tagName != "TABLE")) menuItemNormal(fromEl); window.status = ""; } } } functionggleMenu(el) { if (el.menu == null) el.menu = getChildren(el); if (el.menu == activeMenu) { if (activeSub) menuItemNormal(activeSub.parentElement.parentElement); 정리(el.menu,true); 활성메뉴 = null; activeSub = null; // showWindowedObjects(true); } else { if (activeMenu) { 정리(activeMenu,true); hideMenu(활성메뉴); } activeMenu = el.menu; var tPos = topPos(el.menu) + menu.offsetHeight; if ((document.body.offsetHeight - tPos) >= el.menu.offsetHeight) { el.menu.style.pixelTop = (ie5) ? el.offsetHeight + 1 : menu.offsetHeight - el.offsetTop - 2; 디렉토리 = 2; } else { el.menu.style.pixelTop = (ie5) ? el.offsetTop - el.menu.offsetHeight - 1 : el.offsetTop - el.menu.offsetHeight + 2; 디렉토리 = 8; } el.menu.style.pixelLeft = (ie5) ? el.offsetLeft - 2 : el.offsetLeft; 표시(el.menu, dir); showWindowedObjects(false); } } 함수 showSubMenu(el,show) { var dir = 2; 온도 = 엘; list = el.children.tags("TD"); 엘 = 목록[list.length-1]; if (el.menu == null) el.menu = getChildren(el); temp.subMenu = el.menu; if ((el.menu != activeMenu) && (표시)) { activeSub = el.menu; var lPos = leftPos(el.menu); if ((document.body.offsetWidth - lPos) >= el.menu.offsetWidth) { el.menu.style.left = (ie5) ? el.parentNode.offsetWidth : el.offsetParent.offsetWidth; 디렉토리 = 6; } else { el.menu.style.left = - el.menu.offsetWidth + 3; 디렉토리 = 4; } var tPos = (ie5) ? topPos(el.menu) + el.offsetTop : topPos(el.menu) + el.offsetParent.offsetTop;// + el.menu.offsetTop; if ((document.body.offsetHeight - tPos) >= el.menu.offsetHeight) el.menu.style.top = (ie5) ? el.offsetTop - 4 : el.offsetParent.offsetTop - 2; 그렇지 않으면 el.menu.style.top = (ie5) ? el.offsetTop + el.offsetHeight - el.menu.offsetHeight : el.offsetParent.offsetTop + el.offsetParent.offsetHeight - el.menu.offsetHeight + 2; showSub(el.menu, dir); } else { show(el.menu,dir); activeSub = null; } } 함수 topPos(el) { var temp = el; var y = 0; while (temp.id!="menu") { temp = temp.offsetParent; y += temp.offsetTop; } y를 반환합니다; } 함수 leftPos(el) { var temp = el; var x = 0; while (temp.id!="menu") { temp = temp.offsetParent; x += temp.offsetLeft; } x + el.offsetParent.offsetWidth를 반환합니다. } function show(el, dir) { if (typeof(fade) == "function") fade(el, true); else if (typeof(swipe) == "함수") { tempElSwipe = el; tempDirSwipe = 디렉토리; el.style.visibility = "표시"; el.style.visibility = "숨김"; window.setTimeout("tempSwipe()", 0); // 스와이프(el, dir); } else el.style.visibility = "표시"; } var tempElSwipe, tempDirSwipe; function tempSwipe() { swipe(tempElSwipe, tempDirSwipe); } function showSub(el ,dir) { show(el, dir); // 스와이프(el, dir); // 페이드(el, true); // el.style.visibility = "표시됨"; } function cleanup(menu,hide) { if (menu.activeItem) { //이전에 여기에 온 적이 있는 경우 if ((menu.activeItem.className == "sub") && (menu.activeItem.subMenu)){ / /활성 항목에 하위 메뉴 정리가 있습니다(menu.activeItem.subMenu, true); //하위 항목도 정리합니다. } menuItemNormal(menu.activeItem); } if (숨기기) { hideMenu(메뉴); } } function hideMenu(el) { if (typeof(fade) == "function") { fade(el, false); // window.setTimeout(fadeTimer); } else if (typeof(swipe) == "함수") { hideSwipe(el); } else el.style.visibility = "숨김"; } function getChildren(el) { var tList = el.children.tags("TABLE"); tList[0]을 반환합니다. } var dragObject = null; var dragObjectPos = "top"; var TX; var ty; window.onload=fixSize; window.onresize=fixSize; function fixSize() { if (dragObjectPos == "top") { externalDiv.style.top = menu.offsetHeight; externalDiv.style.height = document.body.clientHeight - menu.offsetHeight; } else if( dragObjectPos == "bottom") { externalDiv.style.top = 0; externalDiv.style.height = document.body.clientHeight - menu.offsetHeight; menu.style.top = document.body.clientHeight - menu.offsetHeight; } else { externalDiv.style.top = 0; externalDiv.style.height=document.body.clientHeight; } } function document.onmousedown() { if(window.event.srcElement.id == "handle") { dragObject = document.all[window.event.srcElement.getAttribute("for")]; 복원하다(); //이동 중 메뉴 숨기기 ty = (window.event.clientY - dragObject.style.pixelTop); window.event.returnValue = 거짓; window.event.cancelBubble = true; } else { dragObject = null; } } 함수 document.onmouseup() { if(dragObject) { dragObject = null; } } function document.onmousemove() { if(dragObject) { if(window.event.clientX >= 0) { if((window.event.clientY - ty) <= 15) { dragObject.style.border = "0 솔리드 버튼페이스"; dragObject.style.width = "100%"; dragObject.style.top = 0; dragObject.style.left = 0; dragObjectPos = "상단"; 수정크기(); } else if ((window.event.clientY - ty) >= document.body.clientHeight - menu.offsetHeight - 15) { dragObject.style.border = "0 솔리드 버튼페이스"; dragObject.style.width = "100%"; dragObject.style.top = document.body.clientHeight - menu.offsetHeight; dragObject.style.left = 0; dragObjectPos="하단"; 수정크기(); } else { dragObject.style.width = "10px"; dragObject.style.left = window.event.clientX; dragObject.style.top = window.event.clientY - 타이; dragObject.style.border = "2px 시작 흰색"; dragObjectPos = "부동"; 수정크기(); } } else { dragObject.style.border = ""; dragObject.style.left = "0"; dragObject.style.top = "0"; } window.event.returnValue = false; window.event.cancelBubble = true; } } function showWindowedObjects(show) { if (hideWindowedControls) { var windowedObjectTags = new Array("SELECT", "IFRAME", "OBJECT", "APPLET","EMBED"); var windowedObjects = new Array(); var j=0; for (var i=0; i<windowedObjectTags.length; i++) { var tmpTags = document.all.tags(windowedObjectTags[i]); if (tmpTags.length > 0) { for (var k=0; k<tmpTags.length; k++) { windowedObjects[j++] = tmpTags[k]; } } } for (var i=0; i<windowedObjects.length; i++) { if (!show) windowedObjects[i].visBackup = (windowedObjects[i].style.visibility == null) ? "visible" : windowedObjects[i].style.visibility; windowedObjects[i].style.visibility = (표시) ? windowedObjects[i].visBackup: "숨김"; } } } </SCRIPT> <TABLE cellSpacing=1 id=menu onclick=menuClick() onmouseout=menuOut() onmouseover=menuOver() onselectstart="return false"> <TBODY> <TR id=menubar> <TD class= 비활성화된 스타일="PADDING-LEFT: 0px; PADDING-RIGHT: 1px"> <DIV class=disabled id=handle style="HEIGHT: 100%; LEFT: 3px; WIDTH: 3px" title="움직여주세요!" for="menu"></DIV></TD> <TD class=root>HOME <TABLE cellSpacing=0 class=menu style="가시성: 숨김"> <TBODY> <TR href="javascript:alert('可以改成一个链接!')"> <TD></TD> <TD noWrap>LINK</TD> <TD></TD> </TR> <TR class=sub> <TD></TD> <TD noWrap>LINK</TD> <TD> <TABLE cellSpacing=0 class=menu style="VISIBILITY: Hidden"> <TBODY> <TR href="javascript:alert('可以改成一个链接')"> <TD noWrap style="HEIGHT: 20px">LINK</TD> </TR> </TBODY> </TABLE> </TD> </TR> <TR class=disabled> <TD colSpan=3> <HR > </TD> </TR> <TR href="javascript:alert('可以改成一个链接')"> <TD></TD> <TD>LINK</TD> <TD></TD> </TR> <TR title="정말 쉽습니다"> <TD></TD> <TD>LINK</TD> <TD></TD> </TR> </TBODY> </TABLE> < /TD> <TD class=root>도움말 <TABLE cellSpacing=0 class=menu style="VISIBILITY: Hidden"> <TBODY> <TR href="javascript:alert('www.downcodes.com')"> <TD ></TD> <TD>정보</TD> <TD></TD></TR></TBODY></TABLE></TD> <TD class=disabled width="100%"> </TD TD></TR></TBODY></TABLE> <DIV id=outerDiv>