Buscar este blog

viernes, 11 de octubre de 2013

FUNCIONES JAVASCRIPT (i)

setAttribute--> Pone un atributo a un Nodo.
nodo.setAttribute("nombre atributo", atributo);


removeChild--> Borra un hijo a un Nodo.

nodo.removeChild(nombre del hijo a borrar);
function equis(){
            var dibujo = document.getElementById("ce");
            var hijo = document.getElementById("imagenCentral");
            dibujo.removeChild(hijo);
            alert("equis");


quirksmode.org/dom/core

No hay comentarios:

Publicar un comentario