Skip to content
Skip to search - Accesskey = s
parentNode.org
The building blocks of a solid frontend.
Pasted
by
weirdish stuff
on
2007-08-23 22:44
as
JavaScript
Create New
http://pastebin.parentnode.org/
Links this one
http://pastebin.parentnode.org/22388
Comment
weirdish stuff
//================================ // this works for some reason, but not very good. //================================ div = document.getElementById("questions"); // the div that the generated content is stored within var txt = document.createTextNode("Question" + counter +": "); div.appendChild(txt); div.removeChild(txt); //================================ // this does not work. //================================ var txt = document.createTextNode("Question" + counter +": "); txt.id = "blah" var txt = document.getElementById("blah"); div.removeChild(txt);