
03/08/2002, 21:51
|
Usuario no validado | | Fecha de Ingreso: julio-2001
Mensajes: 766
Antigüedad: 23 años, 7 meses Puntos: 0 | |
Re: Arreglos (muestra por consulta) haber asi
<html>
<head>
<script>
var num, z;
var tuarray = new Array;
tuarray[0] = "Hola";
tuarray[1] = "Como" ;
tuarray[2] = "Estan";
tuarray[3] = "Gracias";
tuarray[4] = "por";
tuarray[5] = "su";
tuarray[6] = "ayuda";
function buscar(num)
{
z=0;
while((num!=z) && (z<=9))
z++;
if(z>9)
alert ("no se encuentra el numero");
else
alert ("El valor del numero es:"+tuarray[z]);
}
function recoger()
{
num = window.document.miform.mitext.value;
buscar(num);
}
</script>
<body>
<form name="miform">
<input type="text" name="mitext">
<input type="button" value="buscar" onclick="recoger()">
</form>
</body>
</html>
cambie el indice de i a z para evitar errores
<center><hr size="1" width="100%" noshade><a href=javascript:MsgrApp.LaunchIMUI('gpa36@hotmail. com')>
<strong><font face="courier new" color="#666666" size="2">Contact Me?[/CODE]</strong>
<IMG SRC="http://woertman.org:8080/msn/gpa36" border="0"></A></ce |