Link.handleEvent()

JavaScript 1.2+ Nav4+ Syntax

							link.handleEvent(event)

Description

The handleEvent() method invokes the event handler for the Link object.

Example

Listing 7.359 shows how to access the handleEvent() method. All click events are handled by the first link in the document.

Listing 7.359 Example of the handleEvent() Method
<html>
<head>
<title> Using the handleEvent method of the Link object</title>
</head>
<body>

<script language="JavaScript">
<!-- Hide
// sets up the document to capture CLICK events
document.captureEvents(Event.CLICK);

// function that handles the specific event. The evnt parameter refers to
// the event object.
function handle(evnt){
     document.form1.links[0].handleEvent(Event.CLICK);
}
							 function displayMsg(){ ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.