Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/01/2011, 14:09
gcrlink
 
Fecha de Ingreso: enero-2011
Ubicación: Cali
Mensajes: 73
Antigüedad: 13 años, 3 meses
Puntos: 2
Respuesta: AYUDA en contrucción de arrays en javascript

Cita:
Iniciado por GAST0N Ver Mensaje
si es un array te falta declarar q es un array por ejemplo

imagenes = new Array();

GRACIAS POR TU PRONTA RESPUESTA GASTON. PERO ME SIGUE SIN FUNCIONAR. LO CAMBIÉ DE LA SIGUIENTE MANERA:

var imagenes = new Array(2)
imagenes[0] = document.getElementById('f1');
imagenes[1] = document.getElementById('f2');

function prueba()
{
alert(imagenes.length);
imagenes[0].style.display = "none";
}


LA ALERTA ME SIGUE FUNCIONANDO PERO LA SEGUNDA INSTRUCCIÓN NO.
¿QUE SERÁ LO QUE ESTOY HACIENDO MAL?