웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
오른쪽 클릭 메뉴
2002.12.16 02:25
검색해보니 어떤분이 올리신게 있던데 그거와는 전혀 다른거라 살며시 올려봅니다.
스킨설정이 쉽고 타깃 설정이가능하구요....
잘만 꾸미면 원도 메뉴와 비스므리 해진다는.....
예제보기 : 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>
위에다가 본문을 넣어야 합니다.
아래 넣으면 오른쪽 메뉴속에 포함됩니다.
스킨설정이 쉽고 타깃 설정이가능하구요....
잘만 꾸미면 원도 메뉴와 비스므리 해진다는.....
예제보기 : 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>
위에다가 본문을 넣어야 합니다.
아래 넣으면 오른쪽 메뉴속에 포함됩니다.
댓글 6
-
윈드러너
2002.12.24 18:17
-
ATply
2002.12.31 08:24
눌러도 아무 변화 없습니다 -_-;
기본 메뉴가 나올뿐..
(아토 사용자 _-v) -
레드
2003.01.07 18:38
메뉴에 아이콘은 어떻게 바꾸는지..? -
스컬이〃
2003.04.04 20:27
5.0이상에서만 되는듯.. -
ihsahN
2003.05.18 20:34
IE가 없는 리눅스 사용자는 메뉴를 못보네요 ㅠ.ㅠ
뒤로
앞으로
새로고침
책갈피저장
다른이름으로 페이지저장
이런거만 나옴 -_- -
Siny™
2003.05.29 21:20
레드//
<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>
<div class="menuitems" url="http://diablo.new21.net" 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>
<div align=center style="cursor:default">
<img src=http://diablo.new21.net/zboard/outlogin_skin/diarix_login/images/i_memo_on.gif>
</div>
</body>
</html>
<img src=http://diablo.new21.net/zboard/outlogin_skin/diarix_login/images/i_memo_on.gif>
이게 </script>밑에 있어서 들어간겁니다....
제목 | 글쓴이 | 날짜 |
---|---|---|
홈페이지 패스워드(암호) 걸기 소스 [6] | keymove | 2003.01.09 |
select form 으로 새 창 띄우기 [4] | 당근당근 | 2003.01.07 |
[re] select form 으로 새 창 띄우기(간단버전) [3] | RedEye | 2003.01.27 |
갤러리스킨에 쓰면 좋을 것 같은 미리보기(수정2) [10] | 행복한고니 | 2003.01.06 |
크롬리스에 응용할만한 소스;; [3] | MYMob.INT. | 2003.01.05 |
숫자를 한글로 변환하는 함수 [1] | 행복한고니 | 2003.01.03 |
mid 랜덤으로 듣기 ... [2] | 아벨라 | 2003.01.02 |
색다른 링크법(새창) [2] | BIRDY™ | 2002.12.30 |
텍스트 폼 / 전체선택 하기 자바스크립 | mnemosyne | 2002.12.24 |
div, Javascript 이용해서 섹션 테이블 만들기 [3] | mnemosyne | 2002.12.18 |
크롬리스 완벽해결! IE.2.0부터 Netscape까지 작동가능!! [13] | 김민호 | 2002.12.16 |
오른쪽 클릭 메뉴 [6] | 디아릭스 | 2002.12.16 |
select form 으로 새창띄우기(수정:2002-12-19) [3] | dolufy | 2002.12.11 |
홈페이지에 머무른 시간을 알림창으로 나타내기. [3] | 시즌오브드림 | 2002.12.10 |
출렁이며 내려오는 공지창.. [3] | 아벨라 | 2002.12.10 |
아래 새창에 맞게 이미지 띄우기 더더 업그레이드 판! [6] | ATply | 2002.12.09 |
이동 메뉴 (Netscape 가능 NZEO.com 소스) [9] | 박영창 | 2002.12.08 |
아래 이미지크기에 맞게 새창띄우는 소스(기능개선판) (-_-) v [10] | 행복한고니 | 2002.12.07 |
[re] 오류 아닌 오류 나시는 분덜... | 임병찬 | 2003.04.22 |
이미지 크기에 맞게 새창띄우는 자바소스인데요~ [3] | 새벽이슬 | 2002.12.07 |
물론 메뉴도 멋있구요 ㅎㅎ