½ºÆ®¸³Æ®·Î ¾²¿©Áø À̺¥Æ®¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
: (¼Ó¼º ¹®ÀÚ¿­)
¼Ó¼º°ªÀº ½ºÆ®¸³Æ®·Î ¾²¿©Áø À̺¥Æ®¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.
¿¹¸¦µé¾î onmouseover À̺¥Æ®ÀÇ °ªÀº 'onmouseover()'ÀÌ´Ù.

ÀÌ ¼Ó¼ºÀº Àбâ/¾²±âÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.

Àû¿ë
°³Ã¼scriptHTML±Ô°ÝIE
Âü°í
event

(¿µ¹®) W3C DOM Level 2(Document Object Model).



°á°ú Ç¥½Ãâ
°á°ú Ç¥½Ãâ

¿¹Á¦´Â event ¼Ó¼ºÀ» ó¸®ÇÏ¿© onclick À̺¥Æ®¸¦ »ý¼ºÇÑ´Ù.
´ÜÃß¿¡ ¸¶¿ì½º¸¦ ¿Ã¸®¸é ¸¶¿ì½º¿¡¼­ À̺¥Æ®°¡ ¹ß»ýµÇ¾î ½ºÅ©¸³Æ® À̺¥Æ® onclick()À» ¹ß»ý½ÃŲ´Ù.
´ÜÃ߸¦ Ŭ¸¯Çϰųª ¸¶¿ì½º¸¦ ¹ÛÀ¸·Î À̵¿Çصµ ½ºÅ©¸³Æ® À̺¥Æ® onclick()À» ¹ß»ý½ÃŲ´Ù.

<SCRIPT id="scriptObj" for="butObj" event="onclick()">
msg1="´ÜÃß Ç¥½ÃÆÇ ±³Â÷ 1"
msg2="´ÜÃß Ç¥½ÃÆÇ ±³Â÷ 2"
if (butObj.innerText==msg1)butObj.innerText =msg2;
else if (butObj.innerText==msg2) butObj.innerText=msg1;
showA.innerHTML='scriptObj.event='+scriptObj.event;
</SCRIPT>
<BUTTON id="butObj"
  onmouseover="showA.innerHTML='scriptObj.event='+scriptObj.event;showB.innerHTML='event.type='+event.type"
  onmouseout="showA.innerHTML='';showB.innerHTML='event.type='+event.type">´ÜÃß Ç¥½ÃÆÇ ±³Â÷ 1</BUTTON><BR>
<SCRIPT>
document.write('scriptObj.event='+scriptObj.event);
</SCRIPT>
<DIV id=showA style="border:solid 1 blue;padding:3;width:200">°á°ú Ç¥½Ãâ</DIV>
<DIV id=showB style="border:solid 1 blue;padding:3;width:200">°á°ú Ç¥½Ãâ</DIV>