Hallo Ingo.
- Ich bin mir nicht ganz sicher, aber document.body dürfte nicht in jedem Browser funktionieren.
Da kann man wohl nichts ändern. Wenn ein Client mit document.body nichts anfangen kann, hat er wohl oder übel Pech gehabt. Dieses Objekt gehört zur absoluten Minimalanforderung an jeden Client, der behauptet JS zu verstehen.
Weitreichender unterstützt als document.getElementsByTagName('body')[0] ist es allemal.
Einen schönen Mittwoch 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]