1. A link colors can be accessed using the document object
    1. document.alinkColor = "#FFCC33"
    2. document.linkColor = "#FFCC33"
    3. document.vlinkColor = "#FFCC33"
  2. You can refer to all the links on your page with a reference to the document

    document.links[n] (a number or the name of that link is inserted in the square brackets)


  3. You can refer to your anchors the same way


  4. document.anchors[n] (a number or the name of that link is inserted in the square brackets)

  5. You can refer to the hash close to the same way (the hash is the part that follows the # in your anchor)

    document.links[n].hash = "targetname"

  6. You can refer to the host close to the same way (that is a combination of the host name and the port of the destination server.)

    document.links[n].host = "www.enetopia.com:80"

  7. You can refer to the host name close to the same way

    document.links[n].hostname = "www.enetopia.com"

  8. You can refer to the href close to the same way

    document.links[n].href = "http://www.enetopia.com"

  9. You can refer to the path attribute close to the same way (that's the part that doesn't have the server name or port in it

    document.links[n].path = "/images/newest/myPict.gif"

  10. You can refer to the port attribute close to the same way

    document.links[n].port = "enetopia"

  11. You can refer to the protocol attribute close to the same way

    document.links[n].protocol = "http:"

    various protocols are: http, ftp, file, mailto, or https

  12. You can refer to the search attribute close to the same way (that's the part that is after the ? character.) Using the ? is a way to transfer information besides just the URL.

    document.links[n].search = "?name=Gail&platform=ie6"

  13. You can refer to the target attribute close to the same way. (The "_top" designation automatically assigns the link the top of the frame, so we are no longer inside a frame)

    document.links[n].target = "_top"