ÇöÀçÀÇ ¹®¼¿¡¼ °³Ã¼·Î ºÎÅÍ ¸¶¿ì½º ĸÃÄ(mouse capture)¸¦ Á¦°ÅÇÑ´Ù.
ÆĶó¸ÞÅÍ´Â ¾ø´Ù.
¹Ýȯ°ªÀº ¾ø´Ù.
releaseCapture ¸Þ¼µå°¡ ÀÛ¿ëµÇ±â À§Çؼ´Â setCapture ¸Þ¼µå¸¦ ÅëÇÏ¿© ¸¶¿ì½º ĸÃÄ(mouse capture)¸¦ ¼³Á¤ÇÏ¿©¾ß ÇÑ´Ù.
document °³Ã¼¿¡¼ releaseCapture ¸Þ¼µå¸¦ ÀÛµ¿½Ãų ¼ö ÀÖ´Ù. ¾î´À ĸÃÄµÈ ¿¤·¹¸àÆ®°¡ ÇØÁ¦µÉ °ÍÀΰ¡¸¦ releaseCapture ¸Þ¼µå°¡ °áÁ¤ÇÒ ¼ö ÀÖ°ÔÇÑ´Ù. ¹®¼ÀÇ Ä¸Ãĸ¦ ÇØÁ¦ÇÏ´Â ´Ù¸¥ ÀÛ¿ëµéÀº ¸ð´Þ(modal) ´ëÈâ µð½ºÇ÷¹ÀÌÇϰųª, ÃÊÁ¡À» ´Ù¸¥ °÷¿¡ À̵¿½ÃÅ°´Â °Í ȤÀº À©·Î¿ì¸¦ ÇàÇØÇÏ°Ô ÇÏ´Â °ÍÀ» µîÀÌ ÀÖ´Ù.
°³Ã¼ | script | IE |
---|
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>