onmouseenter, onmouseleave, onmouseover, onmouseout À̺¥Æ® ¿¹Á¦


onmouseenter, onmouseleave Á¤º¸ Ç¥½Ãâ
onmouseover, onmouseout Á¤º¸ Ç¥½Ãâ

onmouseenter, onmouseleave¿Í onmouseover, onmouseout À̺¥Æ®µéÀÇ Â÷ÀÌÁ¡À» ºñ±³ÇØ º¸¶ó.

À̺¥Æ® ¹ß»ýÀ» ¸ðü ¿ë±â °³Ã¼ DIV¿¡¼­ ÇÏ¿´´Ù.
onmouseenter, onmouseleave À̺¥Æ®´Â ¸ðü¿¡¼­¸¸ ¹ß»ýµÈ´Ù(¹öºí¸µÀÌ ¾ø´Ù).

onmouseover, onmouseout À̺¥Æ®´Â ÇØ´ç °³Ã¼¿¡¼­ ¹ß»ýµÈ´Ù(¹öºí¸µÀÌ ÀÖ´Ù).

<STYLE>
.divClass{border:solid 2 red;padding:20;background:dfd;padding-right:0;padding-top:0}
.spanClass{border:solid 1 pink;background:yellow;}
.showClass{border:solid 1 blue;background:dfd;padding:5;height:1.2em;width:700}
</STYLE>
<SCRIPT>
function enterLeave(){
  showEnter.innerHTML='event.srcElement.nodeName='+event.srcElement.tagName;
  showEnter.innerHTML+=' event.srcElement.id='+event.srcElement.id+' event.type='+event.type;
}
function overOut(){
  showOver.innerHTML='event.srcElement.nodeName='+event.srcElement.nodeName;
  showOver.innerHTML+=' event.srcElement.id='+event.srcElement.id+' event.type='+event.type;
}
</SCRIPT>
<DIV id=divObj class=divClass
  onmouseenter="enterLeave()" onmouseleave="enterLeave()"
  onmouseover="overOut()" onmouseout="overOut()">
<BUTTON id=butObj>¿©±â¿¡ <SPAN id=spanObj class=spanClass>¸¶¿ì½º</SPAN>¸¦ ¿Ã·Áº¸¶ó.</BUTTON>
<HR id=hrObj size=10 width=200 color=green>
</DIV>
<DIV id=showEnter class=showClass>onmouseenter, onmouseleave Á¤º¸ Ç¥½Ãâ</DIV>
<DIV id=showOver class=showClass>onmouseover, onmouseout Á¤º¸ Ç¥½Ãâ</DIV>