« Gecko DOM リファレンス
概要
anchors はドキュメント内のすべてのアンカーのリストを返します。
構文
nodeList = document.anchors
例
if ( document.anchors.length >= 5 ) {
dump("dump found too many anchors");
window.location = "http://www.google.com";
}
注記
後方互換性のため、返されるアンカーのセットにはname属性付きで作成されたアンカーのみ含まれ、id属性付きで作成されたものは含まれません。