August 1999
Intermediate to advanced
1488 pages
72h 53m
English
image.handleEvent(event)
The handleEvent() method provides a way to invoke an image's event handler, even though the event never happened. The event argument associated with this method can be any of the events handled by the Image object.
Listing 7.304 shows how to force an image to handle a KEYDOWN event.
<img name="circle" src="circle.gif" onKeyDown="alert('Key pressed')">
<script language="JavaScript">
<!-- Hide
document.circle.handleEvent(Event.KEYDOWN);
//Hide End --->
</script>
|
Read now
Unlock full access