![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
28/07/2006, 09:01
|
![Avatar de .php](http://static.forosdelweb.com/customavatars/avatar145204_1.gif) | | | Fecha de Ingreso: julio-2006
Mensajes: 481
Antigüedad: 18 años, 6 meses Puntos: 5 | |
Código:
function MisArray(){
var a = new Array(); /* declaro mi array */
a[1] = "hola mundo"; /* ingreso informacion */
a[2] = "chao mundo"; /* ingreso más informacion */
for(i=1;i<=2;i++){ /* bucle hasta 2 veces */
if(a[i] == "hola mundo"){ /* pregunto si array[indice] es = a "hola mundo" */
alert(a[i]) /* muestro la informacion del indice encontrado*/
} /* fin si */
} /* fin for*/
}
Última edición por .php; 28/07/2006 a las 09:13 |