Tengo:
Código:
var td = document.getElementById("principal");
var usuari = document.createTextNode("usuari: " + arrayResposta[0]);
var saldo = document.createTextNode("saldo: " + arrayResposta[1]);
var barri = document.createTextNode("barri: " + arrayResposta[2]);
var posicio = document.createTextNode("posicio: " + arrayResposta[3]);
var salt = document.createElement("br");
var noudiv = document.createElement("div");
noudiv.id = "taulell";
td.appendChild(noudiv);
noudiv.appendChild(usuari);
noudiv.appendChild(salt);
noudiv.appendChild(saldo);
noudiv.appendChild(salt);
noudiv.appendChild(barri);
noudiv.appendChild(salt);
noudiv.appendChild(posicio);
y la question es que no me hace correctamente los saltos de linia (<br /> ) y sale el texto junto. ¿Hay otra manera para hacerlo?