Link.handleEvent() : a link : HTML Tags JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » HTML Tags » a link »

 

Link.handleEvent()









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.navioo.com" onClick='displayMsg()'>www.navioo.com</a>
    <br>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo HTML Tags
» a link