TOC PREV NEXT INDEX

domref



links


The links property returns a collection of all AREA elements and anchor elements in a document with a value for the href attribute.

Syntax

linkArray = document.links
 

Parameters

linkArray is an array of the links in the document

Example

var links = document.links;
 
for(var i = 0; i < links.length; i++) {
 
    var linkHref = 
       document.createTextNode(links[i].href);
 
    var lineBreak = document.createElement("br");
 
    document.body.appendChild(linkHref);
 
    document.body.appendChild(lineBreak);
 
} 
 

Notes

None.

Specification

links
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX