웹마스터 팁

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


예제보기 : 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>  
위에다가 본문을 넣어야 합니다.
아래 넣으면 오른쪽 메뉴속에 포함됩니다.
제목 글쓴이 날짜
ie60이상버전의 개인정보기능으로 인한 서비스문제 [2] 날파리 2003.05.21
[간단팁] 윈도우즈 2003 에서 mysql 사용할때.. [5] 오종선 2003.05.22
[진자 유용한] www 자동으로 붙여주기 [6] Dopesoul 2003.05.24
APM_Setup4 에서 에러페이지 띄우기 [2] RedEye(kaist) 2003.05.28
아파치 보안취약점 관련 버전 업데이트 DearMai 2003.05.30
iis + php + mysql 강좌 (윈도우설치) [5] 이성헌 2003.06.01
iis + php + mysql 보충설명. [2] 이성헌 2003.06.01
아파치 버츄얼웹서버에서 웹로그 분석툴 : Webalizer 설치 [2] [1] 정인배 2003.06.02
네임(DNS) 서버 named.conf 설정 하기 정인배 2003.06.02
아파치 : Name-based Virtual Host 사용하기 정인배 2003.06.02
아파치 : IP-based Virtual Host 사용하기 정인배 2003.06.02
Windows Media 서비스에 대한 ISAPI 확장 결함 DearMai 2003.06.03
apache + php + mysql (window 설치) 이성헌 2003.06.05
mysql 강좌 .. 요약본 [4] 이성헌 2003.06.05
php 와 mysql 을 이용한 웹인증..(윈도우에서) 이성헌 2003.06.05
apache 서버에서 apache 인증 (윈도우에서 apm 설치후) 이성헌 2003.06.05
apache 서버에서 디렉토리 보기 방지. [5] 이성헌 2003.06.08
윈98에서 Apache+iASP+Tomcat4.x+Mysql+PHP ...사용하기 [5] 한희진 2003.06.11
webalizer 윈도우+아파치에서 돌려보기 [3] [1] HuHu^^; 2003.06.12
극심한 시스템 파괴시 재해복구 Process [7] Dopesoul 2003.06.14