This interface provides access to the event processes, such as the element in which the event occurred, the state of the keyboard keys, the location of the mouse, and the state of the mouse buttons.
IHTMLEventObj Methods
get_altKey Retrieves the state of the ALT key. get_button Retrieves which mouse button, if any, is pressed. get_cancelBubble Retrieves the value that indicates whether the current event should bubble up the hierarchy of event handlers. get_clientX Retrieves the horizontal position of the mouse hit relative to the top of the client area of the window, excluding window decorations or scroll bars. get_clientY Retrieves the vertical position of the mouse hit relative to side of the client area of the window, excluding window decorations or scroll bars. get_ctrlKey Retrieves the state of the CTRL key. get_fromElement Retrieves the object the cursor is exiting during the onmouseover and onmouseout events. get_keyCode Retrieves the Unicode key code associated with the key that caused the event. get_offsetX Retrieves the horizontal coordinate of the mouse's position relative to the object firing the event. get_offsetY Retrieves the vertical coordinate of the mouse's position relative to the object firing the event. get_qualifier Specifies the event qualifier parameter passed with the event. get_reason Retrieves the disposition of data transfer for a data source object. get_returnValue Retrieves the return value of the event. get_screenX Retrieves the vertical position of the event, in pixels, relative to the user's screen. get_screenY Retrieves the horizontal position of the event, in pixels, relative to the user's screen. get_shiftKey Retrieves the state of the SHIFT key. get_srcElement Retrieves an interface pointer for the object in which the event occurred. get_srcFilter Retrieves the filter object that caused the onfilterchange event. get_toElement Retrieves the object being moved to for the onmouseover and onmouseout events. get_type Retrieves the event name as a string. get_x Retrieves the position of the mouse hit relative to the object in the parent hierarchy that is positioned using the cascading style sheets (CSS) positioning attribute. get_y Retrieves the position of the mouse hit relative to the object in the parent hierarchy that is positioned using the cascading style sheets (CSS) positioning attribute. put_cancelBubble Sets the value that indicates whether the current event should bubble up the hierarchy of event handlers. put_keyCode Sets the Unicode key code associated with the key that caused the event. put_returnValue Sets the return value of the event.
Interface Information
Implementation System (Mshtml.dll) Inherits from IDispatch Header and IDL files Mshtml.h, Mshtml.idl Minimum availability Internet Explorer 4.0 Minimum operating systems Windows 95, Windows NT 4.0
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0
Remarks
The event object is only available during an event; that is, you can use it in event handlers but not in other code. You retrieve the event object by calling the IHTMLWindow2::get_event method.
Although all event properties are available to all event objects, some properties might not have meaningful values during some events. For example, the values retrieved by the get_fromElement and the get_toElement methods are meaningful only when processing the onmouseover and onmouseout events.