ToolBar Ver1.1 for ie4, ie5
../


[IE4, IE5 ¿ë Ver1.1] / [NN4 ¿ë Ver1.1]


Ç×»ó ÀÏÁ¤ÇÑ À§Ä¡¿¡ °íÁ¤ÇÏ´Â Ver1.1À» ¸¸µé±â À§Çؼ­´Â ¸Å´º¸¦ ¸¸µå´Â Ver1.0ÀÇ "ieToolBar.js"¿¡ °íÁ¤½ÃŰ´Â JavaScript ±¸¹®À» Ãß°¡ÇØ ÁÝ´Ï´Ù. Ãß°¡ÇÏ¿© ÀÛ¼ºÇÑ Àüü ¼Ò½º´Â ¾Æ·¡ÀÔ´Ï´Ù. ¾à°£ÀÇ Ãß°¡¸¸ ÇØÁÖ¸é µË´Ï´Ù.
/***************************************************
	Tool Bar Version 1.1 (99/10/08)
	Yongsuk Lee (spacekan@chollian.net)
	(http://user.chollian.net/~spacekan/)
****************************************************/
menuStyle = ''
	+ '<style>'
	+ '.noLine { text-decoration:none; font-weight:bold; color:black}'
	+ '#M1, #M2, #M3, #M4 { ' // »óÀ§ ¸Å´º
		+ 'position:absolute; top:0px; left:0px; width:50px; border:outset 2px white; '
		+ 'background-color: lightblue; font-size: 9pt; '
		+ 'font-weight:bold; padding:2px; text-align: center;  }'
	+ '#M1 { width:150px; left:0px; }'
	+ '#M2 { width:120px; left:150px; }'
	+ '#M3 { width:120px; left:270px; }'
	+ '#M4 { width:50px; left:390px; }'
	
	+ '#S1, #S2, #S3, #S4 { ' // ÇÏÀ§ ¸Å´º
		+ 'position:absolute; top:40; left:300; width:100; visibility:hidden; border:outset 2px white; '
		+ 'background-color: lightblue; font-size: 9pt; line-height:12pt; padding:10px; }'
	+ '#S1 {width:200; left:0px;}'
	+ '#S2 {width:170; left:150px; }'
	+ '#S3 {width:170; left:270px; }'
	+ '#S4 {width:100; left:390px; }'
	+ '</style>';

menuLayout = ''
	+ '<span id=M1>Tool Bar Ver 1.0</span>'
	+ '<span id=M2>NN4 »ç¿ë¹ý</span>'
	+ '<span id=M3>IE4 »ç¿ë¹ý</span>'
	+ '<span id=M4>¹®Á¦Á¡</span>';

subMenuLayout = ''
+ '<div id=S1>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="toolBar10.htm">Tool Bar Ver 1.0</a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="toolBarWork.htm">ToolBar Ver 1.0 µ¿ÀÛ ¹æ½Ä</a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="toolBar10Base.htm">±âº» ÆäÀÌÁö</a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="../toolBar.htm">../</a><br>'
+ '</div>'
+ '<div id=S2>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="nn4MakeToolBar.htm">Tool Bar ¸¸µé±â</a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="nn4Pos.htm">¹èÄ¡Çϱâ</a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="">style°ú html ÀÛ¼ºÇϱâ</a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="">script ¼öÁ¤Çϱâ</a><br>'
+ '</div>'
+ '<div id=S3>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="ie4MakeToolBar.htm">Tool Bar ¸¸µé±â</a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="ie4Pos.htm">¹èÄ¡Çϱâ</a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="">style°ú html ÀÛ¼ºÇϱâ</a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href="">script ¼öÁ¤Çϱâ</a><br>'
+ '</div>'
+ '<div id=S4>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href=""><img src="../images/n4.gif" border=0><img src="../images/n4.gif" border=0><img src="../images/n4.gif" border=0></a><br>'
	+ '<a class=noLine onmouseover="this.style.color=\'red\'" onmouseout="this.style.color=\'black\'" href=""><img src="../images/e4.gif" border=0><img src="../images/e4.gif" border=0><img src="../images/e4.gif" border=0></a><br>'
+ '</div>';

function menuOver() {
 	if( this.son != subLayerOn && subLayerOn) subLayerOn.style.visibility="hidden" 
	this.style.color = "red"
	this.son.style.visibility="visible"
}
function menuOut() { 
	subLayerOn = this.son; 
	this.style.color = "black"
}
function subOn() {
	clearTimeout(sub_ID)
}
function subOut() {
	sub_ID = setTimeout("subLayerOn.style.visibility='hidden'", 1)
}
function displayMenu() {
	if(!document.all) return
	var menuLayer, subLayer
	var firstPos = 0 
	for(var i=1; i<5; i++) {
		menuLayer = document.all["M"+i]
		subLayer = document.all["S"+i]
			
		menuLayer.onmouseover=menuOver
		menuLayer.onmouseout=menuOut
		menuLayer.son=subLayer
		
		subLayer.onmouseover = subOn
		subLayer.onmouseout = subOut 

		menuLayer.style.pixelLeft = firstPos
		menuLayer.style.pixelTop = document.body.scrollTop
		firstPos += menuLayer.offsetWidth
		
		subLayer.style.pixelTop = menuLayer.style.pixelTop + menuLayer.offsetHeight -1
		subLayer.style.pixelLeft = menuLayer.style.pixelLeft
	}
}

function fixMenu() {
	var menuLayer, subLayer
	var topPos = document.body.scrollTop
	for(var i=1; i<5; i++) {
		menuLayer = document.all["M"+i]
		subLayer = document.all["S"+i]
		
		menuLayer.style.pixelTop = topPos
		subLayer.style.pixelTop = topPos + menuLayer.offsetHeight
	}
}
window.onscroll = fixMenu

subLayerOn=sub_ID=null
document.write(menuStyle)
document.write(menuLayout)
document.write(subMenuLayout)
displayMenu()

[Àüü ±¸¹® º¸±â]

À§ÀÇ ie4¿ë È­ÀÏ¿¡¼­ ´Ù¸¥ °ÍÀº ¶È°°°í display() ÇÔ¼ö¸¦ ¾à°£ ¼öÁ¤ÇÏ°í ±½Àº ±ÛÀÚÀÇ ±¸¹®ÀÌ Ãß°¡ÇÑ javaScript ±¸¹®ÀÔ´Ï´Ù. Ãß°¡ÇÑ ±¸¹®¸¸ ÀûÀ¸¸é ¾Æ·¡ÀÔ´Ï´Ù.
function fixMenu() {
	var menuLayer, subLayer
	var topPos = document.body.scrollTop
	for(var i=1; i<5; i++) {
		menuLayer = document.all["M"+i]
		subLayer = document.all["S"+i]
		
		menuLayer.style.pixelTop = topPos
		subLayer.style.pixelTop = topPos + menuLayer.offsetHeight
	}
}
window.onscroll = fixMenu
À¸·Î ÇÔ¼ö Çϳª¿Í À̺¥Æ® Çϳª¸¦ ÁöÁ¤ÇØ ÁÖ¾ú½À´Ï´Ù. »ý°¢º¸´Ù ³Ê¹« °£´ÜÇÕ´Ï´Ù. onscrollÀº scroll À̺¥Æ®¸¦ ÁöÁ¤ÇÏ´Â °ÍÀÔ´Ï´Ù. Áï, ÇÑ ÆäÀÌÁö ³Ñ¾î°¡´Â ÆäÀÌÁö´Â À̵¿¸·´ë(scroll bar)°¡ »ý±â´Âµ¥ ÀÌ À̵¿¸·´ë¸¦ ¸¶¿ì½º·Î À̵¿½ÃŰ°Å³ª "Page Up", "Page Down"À̳ª È­»ìÇ¥ ÀÚÆÇÀ¸·Î ÆäÀÌÁö¸¦ ¾Æ·¡À§·Î ¶Ç´Â Á¿ì·Î À̵¿½ÃŰ¸é ¹ß»ýÇÏ´Â JavaScript 1.2 À̺¥Æ®ÀÔ´Ï´Ù.

ÀÌ À̺¥Æ®·Î ie4, ie5¸¦ »ç¿ëÇÏ´Â »ç¿ëÀÚ°¡ À̵¿¸·´ë¸¦ À̵¿½Ã۸é ÁöÁ¤ÇÑ ÇÔ¼ö "fixMenu()"¸¦ ½ÇÇàÇÏ¿© ¸Å´º¿Í ÇÏÀ§ ¸Å´ºÀÇ ÁÂÇ¥¸¦ ÆäÀÌÁö¿¡¼­ À̵¿¸·´ë°¡ À̵¿ÇÑ °Å¸®¸¦ ³ªÅ¸³»´Â "document.body.scrollTop"¸¦ ÁöÁ¤ÇØ ÁÝ´Ï´Ù. ±×·¯¸é Ç×»ó ±× À§Ä¡¿¡ ¸Å´º°¡ À§Ä¡ÇÕ´Ï´Ù. ¼öÆòÀ¸·Î °íÁ¤ ½ÃŰ´Â °Íµµ °°ÀÌ ÁöÁ¤ÇØÁÙ ¼ö ÀÖÁö¸¸ ¼öÆòÀ¸·Î °»½ÅÀº º° Çʿ䰡 ¾øÀ» °ÍÀÔ´Ï´Ù. °¡´ÉÇÏ¸é ÆäÀÌÁö¿¡ ¼öÆòÀ̵¿ ¸·´ë´Â »ý±âÁö ¾Ê°Ô ÆäÀÌÁö¸¦ ¸¸µå´Ï±î¿ä..

--
Á¦ ÆäÀÌÁö¿¡´Â JavaScript ±¸¹®À» ¸¹ÀÌ ¿¹¸¦ µì´Ï´Ù. ±×·¡¼­ ºÒ°¡ÇÇÇÏ°Ô ±¸¹®ÀÌ ±æ¾îÁ®¼­ ¼öÆò À̵¿¸·´ë°¡ »ý±é´Ï´Ù. JavaScript ±¸¹®Àº ¿©·¯ÁÙ·Î ³ª´©¸é À߸ø ÀÌÇØÇÒ ¼ö ÀÖ´Â °æ¿ì°¡ ¸¹±â ¶§¹®ÀÔ´Ï´Ù. Àý´ë·Î ¼öÆò À̵¿¸·´ë¿¡ ½Å°æ¾²Áö ¾Ê´Â °ÍÀÌ ¾Æ´Õ´Ï´Ù.("±×·¸±¸³ª.."¶ó°í ÇϽô ºÐÀº ¸· ½ÃÀÛÇÏ´Â »ç¶÷ÀÏ °ÍÀÔ´Ï´Ù.. ´Þ¸® ¸»Çϸé Ãʺ¸ÀÚ¿ä.. ¸ÂÁÒ........? Èû³»¼¼¿ä.. :)

[IE4, IE5 ¿ë Ver1.1] / [NN4 ¿ë Ver1.1]


T O P