90
rated 0 times
[
94]
[
4]
/ answers: 1 / hits: 53988
/ 13 Years ago, wed, november 16, 2011, 12:00:00
I insert several textNodes in javascript, and can't figure out how to separate them with carriage returns. I've tried putting n, r, and
but none of them work
var textNode = document.createTextNode(Node on line 1);
element.appendChild(textNode);
textNode = document.createTextNode(Node on line 2);
element.appendChild(textNode);
I want this to appear as:
Node on line 1
Node on line 2
NOT
Node on line 1Node on line2
Any tips on how I can accomplish this ?
More From » javascript