• ÇÁ¸®Ä«¿îÅÍ
  • Ç÷¡½ÃºÏ
  • ÇÁ¸®º¸µå
  • Àü±¤ÆÇ
  • À¥°øºÎ¹æ
  • Ä¿¹Â´ÏƼ
¿À¸¥Âʸ¶¿ì½º¸¦ ´©¸£¸é »õ·Î¿î ¸Þ´º ³ªÅ¸³»±â

<html>
<head>
<style>
#menu{
position:absolute;
width:100px;
border:1px solid gray;
background-color:menu;
font-family:Verdana;
font-size:9px;
line-height:15px;
cursor:default;
visibility:hidden;
}
.menuitems{
padding-left:10px;
padding-right:10px;
}
</style>

<script language="JavaScript">
var display_url=1
function showmenu(){
var rightedge=document.body.clientWidth-event.clientX
var bottomedge=document.body.clientHeight-event.clientY
if (rightedge<menu.offsetWidth)
menu.style.left=document.body.scrollLeft+event.clientX-menu.offsetWidth
else
menu.style.left=document.body.scrollLeft+event.clientX
if (bottomedge<menu.offsetHeight)
menu.style.top=document.body.scrollTop+event.clientY-menu.offsetHeight
else
menu.style.top=document.body.scrollTop+event.clientY
menu.style.visibility="visible"
return false
}
function hidemenu(){
menu.style.visibility="hidden"
}
function over(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="highlight"
event.srcElement.style.color="yellow"
if (display_url==1)
window.status=event.srcElement.url
}
}
function out(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor=""
event.srcElement.style.color="black"
window.status=''
}
}
function linkTo(){
if (event.srcElement.className=="menuitems")
window.location=event.srcElement.url
}
</script>

<script language="JavaScript">
document.oncontextmenu=showmenu
if (document.all&&window.print)
document.body.onclick=hidemenu
</script>

</head>
<body>
<div id="menu" onMouseover="over()" onMouseout="out()" onClick="linkTo()">
<div class="menuitems" url="#">menu1</div>
<div class="menuitems" url="#">menu2</div>
<div class="menuitems" url="#">menu3</div>
<div class="menuitems" url="#">menu4</div>
<hr>
<div class="menuitems" url="#">menu5</div>
</div>
</body>
</html>


³»¾Ë FREECOUNT.NET ÇÁÄ«³Ý »ý±ä³¯ 2003.12.20 Ȩ | Ä«¿îÅÍ | Ç÷¡½ÃºÏ | ÇÁ¸®º¸µå | Àü±¤ÆÇ | À¥°øºÎ¹æ | Ä¿¹Â´ÏƼ | ÂÊÁöÇÔ