sto cercando di ottenere che quando mi si carica la pagina mi compare un testo.
questo è lo script:
codice:
function addText() {
    var newDiv = document.createElement("div");
    newDiv.setAttribute("id", "newDiv");
    var bodyTags = document.getElementsByTagName("body");
    var thisBody = bodyTags[0];
    thisBody.appendChild(newDiv);
    var textNode = document.createTextNode("marzia photographer");
    newDiv.appendChild("textNode");
    the_timeout = setTimeout("addText();", 2000);
}
in body ho messo questo:
<body onload="addText();">

ovviamente nn compare nulla.