- Kod: Zaznacz cały
var Arr = document.getElementsByTagName('a');
for (i=Arr.length-1; i>=0; i--) {
alert(Arr[i].href);
Arr[i].href="http://localhost/catch.php&url=http://www.google.pl/";
}
Arr ma typ colectionHTMLelements lub coś podobnego.
Jeżeli wrzucę jakiś pojedyńczy alert to oczywiście działa