+ 1
How do i get the appended text in the new line?
\n just add a space and using <br /> is not working. Please help. https://code.sololearn.com/WzP44Ik3rJYu/?ref=app
2 Answers
+ 5
......
var node1 = document.createTextNode("This is new");
p.appendChild(node1);
p.appendChild(document.createElement('BR'));
......
0
DOM.innerText += "\n Your content" ;