Hallo Gunnar.
Muss das sein oder kann man sich darauf verlassen, dass
document.body
in allen Browsern funktioniert? (Tut es in IE und FF.)
Du kannst dich darauf verlassen. Sogar noch eher als auf document.getElementsByTagName('body')[0].
Selbst in DOM Level 1 wird document.body schon erwähnt. Faktisch dürfte das body-Objekt aber sogar noch älter sein.
Einen schönen Montag noch.
Gruß, Ashura
--
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]