Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/04/2012, 13:18
AlvaroX
 
Fecha de Ingreso: septiembre-2008
Mensajes: 242
Antigüedad: 15 años, 8 meses
Puntos: 3
append multiple

hola quisera saber como hacer append a muchos elementos tengo este codigo pero cada append se sobrepone en el anterior

fotos = "foto1,foto2,foto3";
split = fotos.split(",");
e2 = document.getElementById('my_div');

for(i=0;i<split.length;i++){
e1 = document.createElement('img');
e1.id = 'img'+i;
e1.src= "img/"+split[i];
e2.appendChild(e1);
}

si me pudieran ayudar porfavor