2009년 04월 23일
$addHandler()로 만든 event handler의 argument 설명
an event handler and retrieve field values related to the event
// attach event handlers
this.onClickHandler = Function.createDelegate(this, this.onClick);
$addHandler(document, 'click', this.onClickHandler);
// event handler (참고자료: http://msdn.microsoft.com/en-us/library/bb383775.aspx )
onClick: function(e)
{
e.target --- Gets the object that the event acted on (srcElement)
e.type --- Gets the name of the event that was raised (event name)
e.charCode --- the character code of the key
e.altKey --- ALT key
e.ctrlKey --- CTRL key
e.shiftKey --- SHIFT key
e.button --- the button state of the mouse ( 0 : left click / 2 : right click )
e.clientX --- x-coordinate (excluding window scroll bars)
e.clientY --- y-coordinate (excluding window scroll bars)
e.offsetX --- x-coordinate of the mouse pointer's position (the object that raised the event)
e.offsetY --- y-coordinate of the mouse pointer's position (the object that raised the event)
e.screenX --- x-coordinate of the mouse pointer's position (the user's screen)
e.screenY --- y-coordinate of the mouse pointer's position (the user's screen)
}
# by | 2009/04/23 05:05 | 느린보 정보 | 트랙백 | 덧글(0)





☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]