¸¶¿ì½º¸¦ ¿Ã¸®¸é ±×¸²ÀÌ º¯ÇÏ´Â ÀÚ¹Ù½ºÅ©¸³Æ®ÀÌ´Ù. ÈçÇÏ°Ô º¼ ¼ö ÀÖ´Â ½ºÅ©¸³Æ® ±â±³À̸ç, ÀÚ½ÅÀÇ È¨ÆäÀÌÁö ¾È¿¡
»ðÀÔÇÏ¿© ÀÀ¿ëÇÏ´Â °Í ¶ÇÇÑ ºñ±³Àû ½¬¿î ½ºÅ©¸³Æ®ÀÌ´Ù. ¾Æ·¡ÀÇ ¹Ì¸®º¸±â¸¦ ÅëÇØ ¸ÕÀú »ç¿ëµÇ´Â ½ºÅ©¸³Æ®¸¦ º¸ÀÚ.
ÀÌ ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇϱâ À§Çؼ´Â ¿ì¼± Àû¿ëÇÏ°íÀÚÇÏ´Â ±×¸²ÀÌ ÇÊ¿äÇÏ´Ù. °¢°¢ÀÇ ±×¸²¿¡´Â ¸¶¿ì½º¸¦ ¿Ã·Á ³õ¾ÒÀ»¶§ÀÇ
±×¸²°ú ¸¶¿ì½º¸¦ Ä¡¿üÀ» ¶§ÀÇ ±×¸² µÎ°¡ÁöÀÇ ±×¸²ÀÌ ÇÊ¿äÇÏ¸ç µÎ°³ÀÇ ±×¸²ÀÇ ³ÐÀÌ¿Í ³ôÀÌ´Â °°°Ô ÇØÁÖ´Â°Ô ÀϹÝÀûÀÌ´Ù.
ÁÖ·Î ¸Þ´º°°Àº°÷¿¡ ÀÀ¿ëµÇ¸ç ¿øÇÏ´Â ¸Þ´º¸¦ ±×¸²À¸·Î Á¦ÀÛÇÏ°í °¢°¢ÀÇ ±×¸²¿¡´Â µÎ°³ÀÇ À̹ÌÁö¸¦ ¸¸µé¾î ¿øÇÏ´Â °¹¼öÀÇ
¸Þ´º¿¡ Àû¿ëÀÌ °¡´ÉÇÏ´Ù. ¾Æ·¡ÀÇ html ¿¹Á¦´Â 4°³ÀÇ ¸Þ´º¸¦ »ç¿ëÇÑ ¿¹ÀÌ¸ç °¢°¢ÀÇ ¸Þ´º¿¡´Â 2°³ÀÇ À̹ÌÁö°¡
»ç¿ëµÇ¾ú´Ù. ÆĶõ»öºÎºÐÀ» ÀÚ½ÅÀÇ È¨ÆäÀÌÁö¿¡ ¸Â°Ô ¼öÁ¤ÇÏ¿© ±×·¡µµ »ðÀÔÇÏ¸é µÈ´Ù.
HTML Example |
<html> <head>
<title>Demo3</title> <script
language="javascript">
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3){
init = "net";
}
else{
init = "ie";
}
if ((init == "net")||((init == "ie")&&(browserVer
>= 4))){ // ¸¶¿ì½º
¿Â/¿ÀÇÁÀ϶§ÀÇ ¸Þ´º±×¸²1 ÁöÁ¤
image1on = new Image;
image1on.src = "tab1on.gif";
image1off = new Image;
image1off.src = "tab1off.gif";
// ¸¶¿ì½º ¿Â/¿ÀÇÁÀ϶§ÀÇ ¸Þ´º±×¸²2
ÁöÁ¤
image2on = new Image;
image2on.src = "tab2on.gif";
image2off = new Image;
image2off.src = "tab2off.gif";
// ¸¶¿ì½º ¿Â/¿ÀÇÁÀ϶§ÀÇ ¸Þ´º±×¸²3
ÁöÁ¤
image3on = new Image;
image3on.src = "tab3on.gif";
image3off = new Image;
image3off.src = "tab3off.gif";
// ¸¶¿ì½º ¿Â/¿ÀÇÁÀ϶§ÀÇ ¸Þ´º±×¸²4
ÁöÁ¤
image4on = new Image;
image4on.src = "tab4on.gif";
image4off = new Image;
image4off.src = "tab4off.gif";
}
function img_on(imgName)
{
if (((init == "net")&&(browserVer >=3))||((init
== "ie")&&(browserVer >= 4))){
imgOn = eval(imgName + "on.src");
document[imgName].src = imgOn;
}
}
function img_off(imgName)
{
if (((init == "net")&&(browserVer >=3))||((init
== "ie")&&(browserVer >= 4))){
imgOff = eval(imgName + "off.src");
document[imgName].src = imgOff;
}
} </script> </head> <body>
<!-- ¿øÇÏ´Â À§Ä¡¿¡ ±×¸²À»
À§Ä¡½ÃÅ°°í ¸µÅ©½ÃŲ´Ù --> <!--
¿Â,¿ÀÇÁµÇ´Â ±×¸²ÀÇ Å©±â´Â °°Àº Å©±â¸¦ °¡Áø´Ù --> <!--
¸Þ´º¸¦ ±¸ºÐÇϴ°ÍÀº image1,image2,image3.image4 ÀÓÀ» ²À ±â¾ïÇÑ´Ù.-->
<!-- name=image1 ºÎºÐÀº ¹Ýµå½Ã
½á¾ßÇÑ´Ù.--> <!--
ù¹ø°±×¸²--> <a href="¹®¼¸í.html"
onMouseover="img_on('image1')"
onMouseout="img_off('image1')"><img
src="tab1off.gif" width=±×¸²³ÐÀÌ
height=±×¸²³ôÀÌ border=0 name="image1"></a>
<!-- µÎ¹ø°±×¸²-->
<a href="¹®¼¸í.html"
onMouseover="img_on('image2')"
onMouseout="img_off('image2')"><img
src="tab2off.gif" width=±×¸²³ÐÀÌ
height=±×¸²Å©±â border=0 name="image2"></a>
<!-- ¼¼¹ø°±×¸²-->
<a href="¹®¼¸í.html"
onMouseover="img_on('image3')"
onMouseout="img_off('image3')"><img
src="tab3off.gif" width=±×¸²³ÐÀÌ
height=±×¸²Å©±â border=0 name="image3"></a>
<!-- ³×¹ø°±×¸²-->
<a href="¹®¼¸í.html"
onMouseover="img_on('image4')"
onMouseout="img_off('image4')"><img
src="tab4off.gif" width=±×¸²³ÐÀÌ
height=±×¸²Å©±â border=0 name="image4"></a>
<-- ±×¸²³ÐÀÌ¿Í ±×¸²Å©±â´Â »ý·«Çصµ
µÈ´Ù --> </body> </html>
|
|
|
|