웹마스터 팁

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


예제보기 : 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>  
위에다가 본문을 넣어야 합니다.
아래 넣으면 오른쪽 메뉴속에 포함됩니다.
제목 글쓴이 날짜
Sketchbook5 레이아웃과 관리자메뉴 충돌 해결 [2] file YJSoft 2013.03.20
팝업모듈 사용시 슬라이드js와 충돌문제 [2] 꿈틀잉 2013.03.21
요약 책갈피 경량판 sns 링크 버튼 디자인 보완 [1] file 웹플러스7 2013.03.21
글 순서 바꾸기 임시방편 [6] 장운주 2008.04.18
네이버 신디케이션(syndication)이 standby로 바뀌는 문제 대처 방안 [4] Define 2012.01.19
회원정보 페이지에 작성 댓글 보기 추가하기 [7] file 늘푸른이 2012.07.12
[애드온]글 , 댓글 삭제시 휴지통으로 보내기 [13] file 민채아빠 2013.01.16
팝업 모듈에서, 사이트 전체에 팝업 띄우는 방법 모르시는 분들을 위해 ^^; [2] sejin7940 2013.03.13
지식인 모듈 기본스킨에서 카테고리 선택 안 해도 질문이 등록되는 버그 수정법 sejin7940 2013.03.12
데이타베이스 복제를 하면 속도가 8%정도 빨라짐 가을풍경 2013.03.03
회원가입시 유저가 비공개 설정하기 [1] file 모앱 2013.03.03
XE 다국어로 페이지/글 작성하기 [4] jhrun 2012.11.05
XE를 홈페이지 루트에 설치하여 BGM 설치가 불가능할 때... [6] Firstlove 2011.05.29
자신의 홈페이지에 웹문서 검색엔진 장착하기 [4] 지하넷 2009.05.04
XE를 아주 간편하게 루트로 옮기기. [23] file LI-NA 2013.02.23
출석부 소시랑 스킨 출석회원없을때 우측위젯이 아래로 떨어지는 현상 해결방법 [3] garnecia 2013.02.23
XE 1.4.X 용 nginx rewrite rule 입니다! (xzet 1.4 기준) CM(OEZ) 2013.02.21
XE 1.5.X 용 nginx rewrite rule 입니다! CM(OEZ) 2013.02.21
글 쓸때 SSL 적용하기 [3] 빛의바다 2013.01.01
각종 스킨 파일 보호 하기 (HTML 소스 보기 방지법) [18] 퍼니엑스이 2009.03.16