|
 |
Invisible escreveu:
> On 22/09/2010 06:04 PM, nemesis wrote:
>
>> document.write is not part of DOM:
>
> I know that.
>
>> you can see it simply writes new
>> content to the page, doesn't work by manipulating trees and nodes as in
>> DOM. It's a relic from pre-standardized Netscape days..., like the blink
>> tag... :p
>
> Well, that's very nice, but as far as I can see, there's no equivalent
> way of doing what document.write does.
what? like:
var foo=document.getElementById("foo");
var p=document.createElement("p");
var txt=document.createTextNode("Text in the paragraph!");
p.appendChild( txt );
foo.appendChild( p );
or something like that (it's been a while I last fiddled with DOM)...
not as practical as document.write, of course...
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
 |