웹마스터 팁

검색해보니 어떤분이 올리신게 있던데 그거와는 전혀 다른거라 살며시 올려봅니다.
스킨설정이 쉽고 타깃 설정이가능하구요....
잘만 꾸미면 원도 메뉴와 비스므리 해진다는.....


예제보기 : http://diablo.new21.net/html/2.html

// 소스----

<html>
<head>
<title>mouse_menu</title>
<style>
<!--

.skin0{
position:absolute;
width:120px;
border:2px solid black;
background-color:silver;
font-family:Verdana;
line-height:20px;
cursor:default;
visibility:hidden;
}

.skin1{
cursor: hand;
font: menutext;
position: absolute;
width: 105px;
background-color: gray;
border: 1 solid buttonface;
visibility:hidden;
border: 2 outset buttonhighlight;
}

.menuitems{
padding-left:15px;
padding-right:10px;
font-size: 9pt;
}
-->
</style>

<script language="JavaScript1.2">
//set the skin of the menu (0 or 1, with 1 rendering a default Windows menu like skin)
var menuskin=1

//set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
var display_url=0


function showmenuie5(){
//Find out how close the mouse is to the corner of the window
var rightedge=document.body.clientWidth-event.clientX
var bottomedge=document.body.clientHeight-event.clientY

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<ie5menu.offsetWidth)
//move the horizontal position of the menu to the left by it's width
ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth
else
//position the horizontal position of the menu where the mouse was clicked
ie5menu.style.left=document.body.scrollLeft+event.clientX

//same concept with the vertical position
if (bottomedge<ie5menu.offsetHeight)
ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight
else
ie5menu.style.top=document.body.scrollTop+event.clientY

ie5menu.style.visibility="visible"
return false
}

function hidemenuie5(){
ie5menu.style.visibility="hidden"
}

function highlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="highlight"
event.srcElement.style.color="white"
if (display_url==1)
window.status=event.srcElement.url
}
}

function lowlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor=""
event.srcElement.style.color="black"
window.status=''
}
}

function jumptoie5(){
if (event.srcElement.className=="menuitems"){
if (event.srcElement.getAttribute("target")!=null)
window.open(event.srcElement.url,event.srcElement.getAttribute("target"))
else
window.location=event.srcElement.url
}
}
</script>
</head>
<body bgcolor=snow>
<P><BR>
유후~~~ 아무곳에서나 마우스 오른쪽 버튼을 클릭해 보세용~~


<!--[if IE]>
<div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5()">
<div align=center style= "font-family:굴림,돋움; font-size:9pt;font-color:000033;cursor:default">--memu--</div>
<div class="menuitems" url="http://nzeo.com" target="newwin">제로보드</div>
<div class="menuitems" url="http://daum.net">다음넷</div>
<div class="menuitems" url="http://naver.com">네이버</div>
<div class="menuitems" url="http://hanmir.com" target="_blank">한미르</div>
<![endif]-->
<script language="JavaScript1.2">
if (document.all&&window.print){
if (menuskin==0)
ie5menu.className="skin0"
else
ie5menu.className="skin1"
document.oncontextmenu=showmenuie5
document.body.onclick=hidemenuie5
}
</script>
</body>
</html>

// 소스끝

주의 하실건.... body 안에서
<!--[if IE]> 에서 </script>  
위에다가 본문을 넣어야 합니다.
아래 넣으면 오른쪽 메뉴속에 포함됩니다.
제목 글쓴이 날짜
MS홈에 쓰이는 오른쪽메뉴 툴바 [13] file Kortion 2003.02.22
슬라이딩 Layer ( 옆에 메뉴 보이시죠, 비슷꾸리한거 ) [8] 이남두 2003.02.26
엔지오식 좌측이동메뉴 레이어 가운데기준정렬 [11] 스티치 2003.03.29
간단한 점프메뉴(selecter) [14] 박재현 2003.04.14
메뉴이동입니다. [5] 데빌스텔스 2003.04.20
메뉴 옆에서 화살표가 스크롤되는.. [2] 힘찬연못 2003.05.29
[스크립트]오른쪽 버튼 누르면 메뉴나오기^^ [1] 처절초보 2003.06.16
[스크립트] 메뉴에 마우슬 데면 서브 메뉴가 나온다 [2] 처절초보 2003.06.16
마우스 오른쪽 버튼 누르면 원하는 메뉴 뜨게 만들기(다른사이트) [3] 김주형 2003.07.03
[수정]롤오버 메뉴에 하위 부메뉴 레이어..(아웃시 하위메뉴사라짐) [24] 미니 2003.08.18
플레쉬 메뉴를 표방한..=ㅁ= 자바스크립트의 수작 버튼 밑으로 스크롤 되는 아이콘입니다. [47] beMax 2003.09.14
플래시느낌의 유동적인 메뉴 [9] jabusim 2003.11.13
오른버튼 누를때 메뉴 뜨게하기(깔끔버전) [5] file 2003.12.09
화면 오른쪽 아래부분에 떠있는 메뉴 레이어(마우스 오버시 부메뉴 펼쳐짐) [7] 봉팀장 2003.12.30
[초간단 자바스크립트!] 색깔바뀌는 메뉴 [3] ∑Ztxy 2004.01.19
[초간단 자바스크립트!] 서브메뉴 만들기...~ [11] ∑Ztxy 2004.03.10
허접한 풀다운 메뉴 소스입니다. (유용한 팁 일지는 모르겠네요.) [9] file tintintm 2004.03.23
클릭하거나, 바탕을 더블클릭하면 나타나는 작은(크기조절가능) 메뉴 ☺심심 2004.05.17
[StylishJAVA]레이어를 이용한 슬라이드 메뉴 [5] ∑Ztxy 2004.06.05
레이어 3 - 메뉴판때기. [1] 미친개 2004.07.04