Hallo nochmal.
var ul = document.getElementsByTagName('ul')[0]; // Die Liste
var li2 = document.getElementsByTagName('li')[1]; // Das Listenelement
alert(li2.firstChild.nodeValue); // zweiter Punkt
Sagt es und befolgt es selber nicht. Es muss natürlich wie folgt lauten:
~~~javascript
var ul = document.getElementsByTagName('ul')[0]; // Die Liste
var li2 = ul.getElementsByTagName('li')[1]; // Das Listenelement
alert(li2.firstChild.nodeValue); // zweiter Punkt
Einen schönen Sonntag noch.
Gruß, Mathias
--
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“
[HTML Design Constraints: Logical Markup]
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“
[HTML Design Constraints: Logical Markup]