Name
anchors — NN 2 IE 3 DOM n/a
Synopsis
A collection of all
A elements whose assigned NAME
attributes make them behave as anchors (instead of links). Collection
members are sorted in source code order. Navigator and Internet
Explorer let you use array notation to access a single anchor in the
collection (e.g., document.anchors[0],
document.anchors["section3"]). Internet Explorer 4
also allows the index value to be placed inside parentheses instead
of brackets (e.g., document.anchors(0)). If you
want to use the anchor’s name as an index value (always as a
string identifier), be sure to use the value of the
NAME attribute, rather than the
ID attribute. To use the ID
attribute in a reference to an anchor, access the object via a
document.all.
elementID
reference.
Object Model Reference
- NN
document.anchors[i]- IE
document.anchors(i)document.anchors[i]
Properties
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access