@@oleeeeeee:
wie kann ich dem script sagen das nicht alle a elemente des dokuments gezählt werden sollen sondern nur jene die sich in einem bestimmten elternelement befinden?
Indem du die Methode 'getElementsByTagName("a")' nicht auf das Objekt 'document', sondern auf 'document.getElementById("vater")' anwendest.
Live long and prosper,
Gunnar
--
“New Jersey Hall of Fame? […] But then I ran through the list of names: Albert Einstein, Bruce Springsteen... my mother's going to like that. […] it's the only time she's going to hear those two names mentioned in the same sentence, so I'm going to enjoy it.” (Bruce Springsteen when inducted into the New Jersey Hall of Fame, 2008-05-04)
“New Jersey Hall of Fame? […] But then I ran through the list of names: Albert Einstein, Bruce Springsteen... my mother's going to like that. […] it's the only time she's going to hear those two names mentioned in the same sentence, so I'm going to enjoy it.” (Bruce Springsteen when inducted into the New Jersey Hall of Fame, 2008-05-04)