First sorry for my English, I am from Spain. I am new working with Javascript and the problem is that when I try to create a node with Javascript, it does not run.
Checking with firebug I discovered that "document.body is null" even though I have specified.
I facilitated the snippet of code that fails:
// Crear nodo de tipo Element
var parrafo = document.createElement("p");
// Crear nodo de tipo Text
var contenido = document.createTextNode("Hola Mundo!");
// Añadir el nodo Text como hijo del nodo Element
parrafo.appendChild(contenido);
alert(document.body)
// Añadir el nodo Element como hijo de la pagina
document.body.appendChild(parrafo);