묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
레이어 메뉴 만들기;;
2003.01.20 16:20
<script language="JavaScript">
<!--
function na_restore_img_src(name, nsdoc)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : '+ '+ 'document.all.'+name);
if (name == '')
return;
if (img && img.altsrc) {
img.src = img.altsrc;
img.altsrc = null;
}
}
function na_preload_img()
{
var img_list = na_preload_img.arguments;
if (document.preloadlist == null)
document.preloadlist = new Array();
var top = document.preloadlist.length;
for (var i=0; i < img_list.length; i++) {
document.preloadlist[top+i] = new Image;
document.preloadlist[top+i].src = img_list[i+1];
}
}
function na_change_img_src(name, nsdoc, rpath, preload)
{
var img = eval((navigator.appName.indexOf('Netscape'+ ', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img) {
img.altsrc = img.src;
img.src = rpath;
}
}
function na_hide_layer(lname)
{
if (document.layers)
document.layers[lname].visibility = 'hide'
if(document.all)
document.all(lname).style.visibility = 'hidden'
}
function na_show_layer(lname)
{
if(document.layers)
document.layers[lname].visibility = 'show'
if(document.all)
document.all(lname).style.visibility = 'visible'
}
// -->
</script>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red" OnLoad="na_preload_img(false,
'http://pizz.x-y.net/ver2/img/ex_roleon.gif');">
<p align="center"><a href="#" OnMouseOut="na_restore_img_src('image1', 'document'); na_hide_layer('layer1');"
OnMouseOver="na_change_img_src('image1', 'document', 'http://pizz.x-y.net/ver2/img/ex_roleon.gif', true);
na_show_layer('layer1');"><img src="http://pizz.x-y.net/ver2/img/ex_roleoff.gif" border="0" name="image1"></a></p>
<div id="layer1" style="background-image:url('http://pizz.x-y.net/ver2/img/ex_menu.gif'); width:90px; height:250px;
position:absolute; left:441px; top:65px; z-index:1; visibility:hidden;">
<p> </p>
</div>
<p align="center"> </p>
</body>
페이지 보기 : http://pizz.x-y.net/ver2/ex_menu.htm
Nzeo 위쪽 메뉴 처럼 레이어 메뉴를 만들려고 하는데요,
OnMouseOut에서 레이어가 사라지게 해서인지, 레이어 부분에 메뉴를 못만들겠네요;;
[으음,, 설명이 안되는;;]
쉽게-_-; Nzeo위쪽 레이어 메뉴 처럼;; 어떻게 레이어를 남기느냐[여전히 횡설수설;]
하는걸;; 좀 가르쳐주세요;
<!--
function na_restore_img_src(name, nsdoc)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : '+ '+ 'document.all.'+name);
if (name == '')
return;
if (img && img.altsrc) {
img.src = img.altsrc;
img.altsrc = null;
}
}
function na_preload_img()
{
var img_list = na_preload_img.arguments;
if (document.preloadlist == null)
document.preloadlist = new Array();
var top = document.preloadlist.length;
for (var i=0; i < img_list.length; i++) {
document.preloadlist[top+i] = new Image;
document.preloadlist[top+i].src = img_list[i+1];
}
}
function na_change_img_src(name, nsdoc, rpath, preload)
{
var img = eval((navigator.appName.indexOf('Netscape'+ ', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img) {
img.altsrc = img.src;
img.src = rpath;
}
}
function na_hide_layer(lname)
{
if (document.layers)
document.layers[lname].visibility = 'hide'
if(document.all)
document.all(lname).style.visibility = 'hidden'
}
function na_show_layer(lname)
{
if(document.layers)
document.layers[lname].visibility = 'show'
if(document.all)
document.all(lname).style.visibility = 'visible'
}
// -->
</script>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red" OnLoad="na_preload_img(false,
'http://pizz.x-y.net/ver2/img/ex_roleon.gif');">
<p align="center"><a href="#" OnMouseOut="na_restore_img_src('image1', 'document'); na_hide_layer('layer1');"
OnMouseOver="na_change_img_src('image1', 'document', 'http://pizz.x-y.net/ver2/img/ex_roleon.gif', true);
na_show_layer('layer1');"><img src="http://pizz.x-y.net/ver2/img/ex_roleoff.gif" border="0" name="image1"></a></p>
<div id="layer1" style="background-image:url('http://pizz.x-y.net/ver2/img/ex_menu.gif'); width:90px; height:250px;
position:absolute; left:441px; top:65px; z-index:1; visibility:hidden;">
<p> </p>
</div>
<p align="center"> </p>
</body>
페이지 보기 : http://pizz.x-y.net/ver2/ex_menu.htm
Nzeo 위쪽 메뉴 처럼 레이어 메뉴를 만들려고 하는데요,
OnMouseOut에서 레이어가 사라지게 해서인지, 레이어 부분에 메뉴를 못만들겠네요;;
[으음,, 설명이 안되는;;]
쉽게-_-; Nzeo위쪽 레이어 메뉴 처럼;; 어떻게 레이어를 남기느냐[여전히 횡설수설;]
하는걸;; 좀 가르쳐주세요;