« Gecko DOM Reference
Summary
anchors returns a list of all of the anchors in the document.
Syntax
nodeList = document.anchors
Example
if ( document.anchors.length >= 5 ) {
dump("dump found too many anchors");
window.location = "http://www.google.com";
}
Notes
For reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute.