sto cercando di ottenere che quando mi si carica la pagina mi compare un testo.
questo è lo script:
in body ho messo questo: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); }
<body onload="addText();">
ovviamente nn compare nulla.

Rispondi quotando