¼ºê ¸Å´º ·¹ÀÌ¾î ¶ç¿ì±â ÇÁ·¹ÀÓ ÀÚµ¿ ¸®»çÀÌ¡ |
|
|
![](icon/private_name/1.gif) |
14³â Àü |
<!-- ¹®¼ ÃÖ»ó´Ü or ÃÖÇÏ´Ü¿¡ À§Ä¡ -->
<div id="layer1" style="display:none;"></div>
Ŭ¸¯À§Ä¡ ÀÖÀ»°æ¿ì
<table>
<tr>
<td>
<!-- Ŭ¸¯ ½ÃÀÛ -->
<div id="menu_1"><a href="javascript:" onMouseOver="return on_layer('menu_1',event,'layer1','test2.php',100,50,10);">Å×½ºÆ®2</a></div>
<!-- Ŭ¸¯ Á¾·á -->
</td>
</tr>
<tr>
<td>
<div id="menu_2"><a href="javascript:" onMouseOver="return on_layer('menu_2',event,'layer1','test2.php',100,50,10);">Å×½ºÆ®2</a></div>
</td>
</tr>
<tr>
<td>
<div id="menu_3"><a href="javascript:" onMouseOver="return on_layer('menu_3',event,'layer1','test2.php',100,50,10);">Å×½ºÆ®2</a></div>
</td>
</tr>
<tr>
<td>
<div id="menu_4"><a href="javascript:" onMouseOver="return on_layer('menu_4',event,'layer1','test2.php',100,50,10);">Å×½ºÆ®2</a></div>
</td>
</tr>
<tr>
<td>
<div id="menu_5"><a href="javascript:" onMouseOver="return on_layer('menu_5',event,'layer1','test2.php',100,50,10);">Å×½ºÆ®2</a></div>
</td>
</tr>
</table>
Ŭ¸¯À§Ä¡ ¾øÀ»°æ¿ì
<table>
<tr>
<td>
<!-- Ŭ¸¯ ½ÃÀÛ -->
<div id="menu_6"><a href="javascript:" onMouseOver="return on_layer('menu_6',event,'layer1','test2.php',100);">Å×½ºÆ®2</a></div>
<!-- Ŭ¸¯ Á¾·á -->
</td>
</tr>
<tr>
<td>
<div id="menu_7"><a href="javascript:" onMouseOver="return on_layer('menu_7',event,'layer1','test2.php',100);">Å×½ºÆ®2</a></div>
</td>
</tr>
<tr>
<td>
<div id="menu_8"><a href="javascript:" onMouseOver="return on_layer('menu_8',event,'layer1','test2.php',100);">Å×½ºÆ®2</a></div>
</td>
</tr>
<tr>
<td>
<div id="menu_9"><a href="javascript:" onMouseOver="return on_layer('menu_9',event,'layer1','test2.php',100);">Å×½ºÆ®2</a></div>
</td>
</tr>
<tr>
<td>
<div id="menu_10"><a href="javascript:" onMouseOver="return on_layer('menu_10',event,'layer1','test2.php',100);">Å×½ºÆ®2</a></div>
</td>
</tr>
</table>
</BODY>
<script>
//(À§Ä¡ div ,event,"·¹À̾î¾ÆÀ̵ð", ÇÁ·¹ÀÓ url, ÇÁ·¹ÀÓwidth, Ŭ¸¯À§Ä¡¿¡¼ + µÉ left, Ŭ¸¯À§Ä¡¿¡¼ + µÉ top)
// Ŭ¸¯ À§Ä¡¸¦ ÀÔ·ÂÇÏÁö ¾ÊÀ»°æ¿ì ¸¶¿ì½º À§Ä¡¿¡ µû¶ó ·¹À̾ Ãâ·ÂµË´Ï´Ù.
function on_layer(posi,e,id,url,wid,leftv,topv){
if(document.all){ // Àͽº Ç÷ÎÀÎÁö ¾Æ´ÑÁö üũ
var doc = document.body;
}
var docid = document.getElementById(id);
var content = "<iframe id='IFRAME' src=" + url + " marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' height='0' style='width:" + wid + "px;background:#000000;' onLoad=resizeHeight('IFRAME')></iframe>";
docid.innerHTML= content;
if(leftv || topv){ // À§Ä¡¸¦ ÀÔ·ÂÇÞÀ»¶§
var mousewidth = findLeft(posi) + leftv;
var mouseheight = findTop(posi) + topv;
}else{
var mousewidth = doc? doc.scrollLeft+event.clientX : pageXOffset+e.clientX; // ¸¶¿ì½º °¡·Î À§Ä¡
var mouseheight = doc? doc.scrollTop+event.clientY : pageYOffset+e.clientY; // ¸¶¿ì½º ¼¼·Î À§Ä¡
}
docid.style.left = mousewidth+"px"; // ·¹ÇÁÆ® À§Ä¡ ¼³Á¤
docid.style.top = mouseheight+"px"; // »ó´Ü À§Ä¡ ¼³Á¤
docid.style.position="absolute"; // Àý´ë°íÁ¤
docid.style.display=""; // ¼û°ÜÁø div ¿ÀÇÂ
return false // ¸®ÅÏ ÆÞ½º ¾ÈÇØÁÖ¸é ie6.0 ¿¡¼ ¾ÈµÊ
}
// ÇÁ·¹ÀÓ ¼¼·Î ±æÀÌ ÀÚµ¿ ¸®»çÀÌ¡À» À§ÇÏ¿©
function resizeHeight(FrameName)
{
if(document.all) {
var body_height = frames[FrameName].document.body.scrollHeight;
} else {
var body_height= document.getElementById(FrameName).contentWindow.document.body.offsetHeight;
}
// ÀÚ·á°¡ ¾øÀ»°æ¿ì ·¹À̾ º¸ÀÌÁö ¾ÈÄÉÇϱâÀ§ÇØ
// alert(body_height); ÁÖ¼®À» ǬÈÄ ¾Æ·¡ ³ª¿À´Â ¼ýÀÚ¿¡ ´ëÀÔ
if(body_height != 22){
document.getElementById(FrameName).height=body_height;
}else{
document.getElementById(FrameName).height=0;
}
}
// ·¹ÇÁÆ® Ŭ¸¯ À§Ä¡
function findLeft(posi){
var parent = document.getElementById(posi).offsetParent
var mousewidth = document.getElementById(posi).offsetLeft;
while(parent){
mousewidth += parent.offsetLeft;
parent = parent.offsetParent;
}
return mousewidth;
}
// ž Ŭ¸¯ À§Ä¡
function findTop(posi){
var parent = document.getElementById(posi).offsetParent
var mouseheight = document.getElementById(posi).offsetLeft;
while(parent){
mouseheight += parent.offsetTop;
parent = parent.offsetParent;
}
return mouseheight;
}
</script>
</HTML> |
|
̵̧ : 426 |
̵̧
¸ñ·Ï
|
|