Link : a link : HTML Tags JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » HTML Tags » a link »

 

Link










The Link object represents an HTML hypertext link.

This can be an image, text, or predefined area within the Web page.

All HTML links are stored in a links[] array.























































































Property/Method Description
handleEvent Event Handler
hash Represents an anchor name in the URL for the link, which begins with the # character
host Represents the host portion of the URL associated with a link
hostname Represents the hostname portion of the URL associated with a link
href Represents the complete URL associated with a link
onClick Event handler for mouse click events
onDblClick Event handler for double mouse click events
onKeyDown Event handler for pressing a key down on a Link object
onKeyPress Event handler for pressing a key on the Link object
onKeyUp Event handler for releasing a key on the Link object
onMouseDown Event handler for pressing the mouse button down on the link
onMouseOut Event handler for moving the mouse cursor away from the link
onMouseOver Event handler for moving the mouse cursor over the link
onMouseUp Event handler for releasing the mouse button on the link
pathname Represents the pathname portion of the link URL
port Represents the port portion of the URL link
protocol Specifies the protocol portion of the URL link
search Represents the query portion of the URL link
target Represents the name of the Window object in which the link is displayed
text The text used to create the link















<html>
    <head>
    <title> Creating a Link object</title>
    </head>
    <body>
    Click on the link to go to the site.
    <br><br>
    <a href=http://www.navioo.com onClick='alert("Go to:" + document.links[0].text)'> Macmillian Publishing</a>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo HTML Tags
» a link