ÇöÀçÀÇ ¹®¼­¿¡¼­ °³Ã¼·Î ºÎÅÍ ¸¶¿ì½º ĸÃÄ(mouse capture)¸¦ Á¦°ÅÇÑ´Ù.

Àμö/ÆĶó¸ÞÅÍ
ÆĶó¸ÞÅÍ

ÆĶó¸ÞÅÍ´Â ¾ø´Ù.

¹Ýȯ°ª

¹Ýȯ°ªÀº ¾ø´Ù.

Ư±â

releaseCapture ¸Þ¼­µå°¡ ÀÛ¿ëµÇ±â À§Çؼ­´Â setCapture ¸Þ¼­µå¸¦ ÅëÇÏ¿© ¸¶¿ì½º ĸÃÄ(mouse capture)¸¦ ¼³Á¤ÇÏ¿©¾ß ÇÑ´Ù.

document °³Ã¼¿¡¼­ releaseCapture ¸Þ¼­µå¸¦ ÀÛµ¿½Ãų ¼ö ÀÖ´Ù. ¾î´À ĸÃÄµÈ ¿¤·¹¸àÆ®°¡ ÇØÁ¦µÉ °ÍÀΰ¡¸¦ releaseCapture ¸Þ¼­µå°¡ °áÁ¤ÇÒ ¼ö ÀÖ°ÔÇÑ´Ù. ¹®¼­ÀÇ Ä¸Ãĸ¦ ÇØÁ¦ÇÏ´Â ´Ù¸¥ ÀÛ¿ëµéÀº ¸ð´Þ(modal) ´ëȭâ µð½ºÇ÷¹ÀÌÇϰųª, ÃÊÁ¡À» ´Ù¸¥ °÷¿¡ À̵¿½ÃÅ°´Â °Í ȤÀº À©·Î¿ì¸¦ ÇàÇØÇÏ°Ô ÇÏ´Â °ÍÀ» µîÀÌ ÀÖ´Ù.

Àû¿ë
°³Ã¼scriptIE
ÂüÁ¶
onlosecapture setCapture

*

releaseCapture ¸Þ¼­µå¸¦ ÀÛµ¿½ÃÅ°±â À§ÇÏ¿© ¹®¼­ À§¿¡¼­ ¸¶¿ì½ºÅ¬ Ŭ¸¯ÇØ º¸¶ó.

<BODY onload="bodyObj.setCapture();" onclick="document.releaseCapture();">
<DIV id=bodyObj
  onlosecapture="alert(event.srcElement.id + ' °³Ã¼°¡ ¸¶¿ì½º ĸÃĸ¦ »ó½ÇÇß´Ù.')"
  onmousemove="xPos.innerText=event.clientX;yPos.innerText=event.clientY";></DIV>
<SPAN id=xPos></SPAN> * <SPAN id=yPos></SPAN>
</BODY>