What's the recommended way to add text with entities
(e.g. myText = "foo b ar") to a newly created DIV?
I might create the DIV like so:
newDiv = document.create Element("DIV");
But the following does not work:
newText = document.create TextNode(myText );
newDiv.appendCh ild(newText);
The following does work, but is it the recommended way?:
newDiv.innerHTM L = myText
Thanks,
Csaba Gabor from New York
(e.g. myText = "foo b ar") to a newly created DIV?
I might create the DIV like so:
newDiv = document.create Element("DIV");
But the following does not work:
newText = document.create TextNode(myText );
newDiv.appendCh ild(newText);
The following does work, but is it the recommended way?:
newDiv.innerHTM L = myText
Thanks,
Csaba Gabor from New York
Comment