Your Search Results

    document.links Redirect 1

    « document

    Summary

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

    Syntax

    nodeList = document.links 
    

    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);
    }
    

    Specification

    DOM Level 2 HTML: links

    Document Tags and Contributors

    Contributors to this page: Sheppy
    Last updated by: Sheppy,
    Hide Sidebar