Código Javascript :
var nombreFrutas = [["pera","f_pera1"], ["manzana","f_manzana1"], ["melocoton","f_melocoton1"], ["naranja","f_naranja1"], ["mandarina","f_mandarina1"], ["Melon","f_melon1"]]; var f_pera = new Array(); f_pera = [["f_pera1"], ["f_pera2"], ["f_pera3"], ["f_pera4"], ["f_pera5"], ["f_pera6"], ["f_pera7"], ["f_pera8"]]; var f_manzana = new Array(); f_manzana = [["f_manzana1"], ["f_manzana2"], ["f_manzana3"], ["f_manzana4"], ["f_manzana5"], ["f_manzana6"]]; var f_melocoton = new Array(); f_melocoton = [["f_melocoton1"], ["f_melocoton1"], ["f_melocoton1"], ["f_melocoton1"]]; document.getElementById("lFrutas").innerHTML += "<div class=frutas><div class=cabecera> \ <div class=nombre>" + array[i][0] + "</div></div> \ <div class=columnaImagenes><div class=imagenPrincipal> <img src="images/" + array[i][1] + ".jpg"></div> \ <div class=miniaturas> \ <img src=images/f_pera1.jpg> \ <img src=images/f_pera2.jpg> \ <img src=images/f_pera3.jpg> \ <img src=images/f_pera4.jpg> \ <img src=images/f_pera5.jpg> \ <img src=images/f_pera6.jpg> \ </div></div> \ <div class=columnaDescripcion><div class=descripcion>" + array[i][3] + "</div> \ </div></div>"; }