°³Ã¼¿¡¼ À̺¥Æ®¸¦ ¹ß»ý½ÃŲ´Ù.
¹Ýȯ°ª bValÀº À̺¥Æ® ¹ß»ýÀÌ ¼º°øÀûÀ¸·Î µÇ¾ú´Â°¡¸¦ ³ªÅ¸³»´Â ºÎ¿ï°ªÀÌ´Ù.
true | À̺¥Æ® ¹ß»ýÀÌ ¼º°øÀûÀ¸·Î µÇ¾ú´Ù. |
false | À̺¥Æ® ¹ß»ýÀÌ Ãë¼ÒµÇ¾ú´Ù. |
¹ß»ýµÇ´Â À̺¥Æ®°¡ Ãë¼ÒµÉ ¼ö ¾øÀ¸¸é, fireEventÀº Ç×»ó true¸¦ ¹ÝȯÇÑ´Ù.
event °³Ã¼¿¡ ÁöÁ¤µÈ °ªµé¿¡ °ü°è¾øÀÌ, cancelBubble, returnValue, srcElement¿Í type ³×°¡Áö ¼Ó¼ºµéÀÇ °ªÀº ´ÙÀ½°ú °°ÀÌ ÃʱâȵȴÙ.
À̺¥Æ® °³Ã¼ ¼Ó¼º | °ª |
---|---|
cancelBubble | false |
returnValue | true |
srcElement | À̺¥Æ®°¡ ¹ß»ýµÇ´Â ¿¤·¹¸àÆ® |
type | ¹ß»ýµÇ´Â À̺¥Æ®ÀÇ À̸§ |
°³Ã¼ | script | IE |
---|
¸¶¿ì½º¸¦ ¿¡ ¿Ã¸®¸é fireEvent ¸Þ¼µå·Î ´ÜÃ߸¦ Ŭ¸¯ÇÏ´Â À̺¥Æ®¸¦ ¹ß»ý½ÃŲ´Ù.
<SCRIPT> function showEvent(){ showA.innerText=event.type+' ¹ß»ý'; butObj.fireEvent('onclick'); if (event.type=='mouseout') showB.innerText=''; } </SCRIPT> <DIV id="divObj" onmouseover="showEvent();" onmouseout="showEvent();" onclick="showEvent();" style="border:solid 1 blue;background:ffd">¸¶¿ì½º¸¦ ¿Ã·È´Ù, ³»·È´Ù, Ŭ¸¯ Çغ¸¶ó.</DIV> <P> <BUTTON id="butObj" onclick="showB.innerText='´ÜÃ߸¦ Ŭ¸¯Çß´Ù!'">Ŭ¸¯´ÜÃß</BUTTON> <DIV>divObj¿¡¼ <SPAN id=showA></SPAN></DIV> <DIV id=showB>°á°ú Ç¥½Ãâ</DIV>