Contents Index Topic Contents |
event Property
Provides state information about a standard DHTML event passed from the scriptlet.
Applies To
Scriptlet object container
Syntax
value = ScriptContainer.event.member
Remarks
This property is read-only. The
event
property provides a way to get state information about any of the standard events passed from the scriptlet: onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseup. This property corresponds to the DHTMLevent
object.To get state information, you can query the values of the
event
property's members, which includealtKey
,ctrlKey
,keyCode
,offsetX
,offsetY
,shiftKey
,srcElement
,type
, and others. The following example script illustrates how you can use theevent
property to get more information about a standard event:Sub ScriptContainer1_onkeyup() MsgBox "The character typed was " & ScriptContainer1.event.keyCode MsgBox "The Alt key state was " & ScriptContainer1.event.altKey MsgBox "The Ctrl key state was " & ScriptContainer1.event.ctrlKey MsgBox "The Shift key state was " & ScriptContainer1.event.shiftKey MsgBox "The mouse was at " & offsetX & ", " & offsetY MsgBox "The affected control was " & ScriptContainer1.event.srcElement MsgBox "The event was " & ScriptContainer1.event.type End SubFor more information about using the
event
property, refer to theevent
object in the DHTML documentation.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.