Link.handleEvent() : a link « HTML Tags « JavaScript Tutorial

Home
JavaScript Tutorial
1.Language Basics
2.Operators
3.Statement
4.Development
5.Number Data Type
6.String
7.Function
8.Global
9.Math
10.Form
11.Array
12.Date
13.Dialogs
14.Document
15.Event
16.Location
17.Navigator
18.Screen
19.Window
20.History
21.HTML Tags
22.Style
23.DOM Node
24.Drag Drop
25.Object Oriented
26.Regular Expressions
27.XML
28.GUI Components
29.Dojo toolkit
30.jQuery
31.Animation
32.MS JScript
JavaScript Tutorial » HTML Tags » a link 
21.1.2.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.java2s.com" onClick='displayMsg()'>www.java2s.com</a>
    <br>
    </form>
    </body>
    </html>
21.1.a link
21.1.1.Link
21.1.2.Link.handleEvent()
21.1.3.Link.hash
21.1.4.Link.host
21.1.5.Link.hostname
21.1.6.Link.href
21.1.7.Link.onClick
21.1.8.Link.onDblClick
21.1.9.Link.onKeyDown
21.1.10.Link.onKeyPress
21.1.11.Link.onKeyUp
21.1.12.Link.onMouseDown
21.1.13.Link.onMouseOut
21.1.14.Link.onMouseOver
21.1.15.Link.onMouseUp
21.1.16.Link.pathname
21.1.17.Link.port
21.1.18.Link.protocol
21.1.19.Link.search
21.1.20.Link.target
21.1.21.Link.text
21.1.22.Call a function in hyperlink
21.1.23.Change links
21.1.24.Hyper link onClick event
21.1.25.Change hyperlink target
21.1.26.Hyper link onmouseover evnet: change window.location
21.1.27.Call your function in hyper link onMouseover event
21.1.28.Update window status bar in mouse over event for a hyper link element tag(IE)
21.1.29.Create a link with value in form controls
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.