인터넷정보

레이어를 이용한 팝업 메뉴

알 수 없는 사용자 2007. 10. 18. 14:05
<body leftmargin=0 topmargin=0>
<script language="JavaScript1.2">

//Contents for 검색엔진
var menu1=new Array()
menu1[0]='<a href=http://www.empas.com target=_blank>Empas</a><br>'
menu1[1]='<a href=http://www.naver.com target=_blank>네이버</a><br>'
menu1[2]='<a href=http://www.daum.net target=_blank>다음</a><br>'
menu1[3]='<a href=http://www.paran.com target=_blank>파란닷컴</a><br>'
menu1[4]='<a href=http://kr.yahoo.com target=_blank>야후 코리아</a><br>'

//Contents for 신문사이트
var menu2=new Array()
menu2[0]='<a href=http://www.hani.co.kr target=_blank>한겨레신문</a><br>'
menu2[1]='<a href=http://www.donga.com target=_blank>동아닷컴</a><br>'

//Contents for 기타사이트
var menu3=new Array()
menu3[0]='<a href=http://www.petiamo.com target=_blank>페티아모</a><br>'
menu3[1]='<a href=http://oxtag.com target=_blank>유마트</a><br>'
menu3[2]='<a href=http://www.wolse.com target=_blank>월세닷컴</a><br>'

</script>
<style>
<!--
.wrap1{position:relative;}
.wrap2{position:absolute;}
#dropmenu0, #dropmenu1{z-index:100;}
-->
</style>
</head>

<script language="JavaScript1.2">
var zindex=100
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
var opr=navigator.userAgent.indexOf("Opera")

function dropit(e,whichone){
curmenuID=ns6? document.getElementById(whichone).id : eval(whichone).id
if (window.themenu&&themenu.id!=curmenuID)
themenuStyle.visibility=ns4?"hide" : "hidden"

themenu=ns6? document.getElementById(whichone): eval(whichone)
themenuStyle=(ns6||ie4)? themenu.style : themenu

themenuoffsetX=(ie4&&opr==-1)? document.body.scrollLeft : 0
themenuoffsetY=(ie4&&opr==-1)? document.body.scrollTop : 0

themenuStyle.left=ns6||ns4? e.pageX-e.layerX : themenuoffsetX+event.clientX-event.offsetX
themenuStyle.top=ns6||ns4? e.pageY-e.layerY+19 : themenuoffsetY+event.clientY-event.offsetY+18

hiddenconst=(ns6||ie4)? "hidden" : "hide"
if (themenuStyle.visibility==hiddenconst){
themenuStyle.visibility=(ns6||ie4)? "visible" : "show"
themenuStyle.zIndex=zindex++
}
else
hidemenu()
return false
}

function hidemenu(){
if ((ie4||ns6)&&window.themenu)
themenuStyle.visibility="hidden"
else if (ns4)
themenu.visibility="hide"
}

if (ie4||ns6)
document.onclick=hidemenu
</script>




<span class=wrap2 onClick="dropit(event, 'dropmenu0');event.cancelBubble=true;return false">
    <a href="http://oxtag.com" onClick="if(ns4) return dropit(event, 'document.dropmenu0')">검색엔진</a>
</span>

<br>

<span class=wrap2 onClick="dropit(event, 'dropmenu1');event.cancelBubble=true;return false">
    <a href="http://oxtag.com" onClick="if(ns4) return dropit(event, 'document.dropmenu1')">신문사</a>
</span>

<br>

<span class=wrap2 onClick="dropit(event, 'dropmenu2');event.cancelBubble=true;return false">
    <a href="http://oxtag.com" onClick="if(ns4) return dropit(event, 'document.dropmenu2')">기타 사이트</a>
</span>


<div id=dropmenu0 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:lightyellow;width:150;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu0.style.padding="4px"
for (i=0;i<menu1.length;i++)
document.write(menu1[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu0.captureEvents(Event.CLICK)
document.dropmenu0.onclick=hidemenu
}
</script>

<div id=dropmenu1 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:lightyellow;width:150;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu1.style.padding="4px"
for (i=0;i<menu2.length;i++)
document.write(menu2[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu1.captureEvents(Event.CLICK)
document.dropmenu1.onclick=hidemenu
}
</script>


<div id=dropmenu2 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:lightyellow;width:150;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu2.style.padding="4px"
for (i=0;i<menu3.length;i++)
document.write(menu3[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu2.captureEvents(Event.CLICK)
document.dropmenu2.onclick=hidemenu
}
</script>
반응형