propertyname is one of the properties listed below.
property of
描述
each link object is a location object and has the same properties as a location object.
if a link object is also an anchor object, the object has entries in both the anchors and links arrays.
when a user clicks a link object and navigates to the destination document (specified by href=locationorurl), the destination document's referrer property contains the url of the source document. evaluate the referrer property from the destination document.
the links array
you can reference the link objects in your code by using the links array. this array contains an entry for each link object (<a href=""> tag) in a document in source order. for example, if a document contains three link objects, these links are reflected as document.links[0], document.links[1], and document.links[2].
to use the links array:
1. document.links[index] 2. document.links.length
index is an integer representing a link in a document.
to obtain the number of links in a document, use the length property: document.links.length.
elements in the links array are read-only. for example, the statement document.links[0]="link1" has no effect.
properties
the link object has the following properties:
the links array has the following properties: