Mega Code Archive

 
Categories / JavaScript Tutorial / HTML Tags
 

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/MethodDescription handleEventEvent Handler hashRepresents an anchor name in the URL for the link, which begins with the # character hostRepresents the host portion of the URL associated with a link hostnameRepresents the hostname portion of the URL associated with a link hrefRepresents the complete URL associated with a link onClickEvent handler for mouse click events onDblClickEvent handler for double mouse click events onKeyDownEvent handler for pressing a key down on a Link object onKeyPressEvent handler for pressing a key on the Link object onKeyUpEvent handler for releasing a key on the Link object onMouseDownEvent handler for pressing the mouse button down on the link onMouseOutEvent handler for moving the mouse cursor away from the link onMouseOverEvent handler for moving the mouse cursor over the link onMouseUpEvent handler for releasing the mouse button on the link pathnameRepresents the pathname portion of the link URL portRepresents the port portion of the URL link protocolSpecifies the protocol portion of the URL link searchRepresents the query portion of the URL link targetRepresents the name of the Window object in which the link is displayed textThe 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.rntsoft.com onClick='alert("Go to:" + document.links[0].text)'> Macmillian Publishing</a>     </body>     </html>