Syntax
link.handleEvent(event)
The handleEvent() method invokes the event handler for the Link object.
<html>
<head>
<title> Using the handleEvent method of the Link object</title>
</head>
<body>
<script language="JavaScript">
<!--
function handle(evnt){
document.form1.links[0].handleEvent(Event.CLICK);
}
function displayMsg(){
alert("Click event occurred.");
}
document.onclick = handle;
-->
</script>
<form name="form1">
<a href="http://www.java2s.com" onClick='displayMsg()'>www.java2s.com</a>
<br>
</form>
</body>
</html>