|
I'm trying to run through all the links on the page. I first tried document.anchors[x] to target each anchor in a loop, but document.anchors.length is returning 0, even when there are plenty of links on the page. I even get 0 when going to google.com and evaluating document.anchors.length from the FireFox JS console.
I have reverted to using document.getElementsByTagName("a") to create the collection, but I'm not sure what I was doing wrong. Has document.anchors been deprecated? Thanks, just looking for a reason for the original problem.
|