Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/11/2005, 18:48
Avatar de flaviovich
flaviovich
 
Fecha de Ingreso: agosto-2005
Ubicación: Lima, Peru
Mensajes: 2.951
Antigüedad: 18 años, 9 meses
Puntos: 39
Hola Fuhira! Y bienvenido
Este script, cumple con lo que pides.
Código HTML:
<html>
<head><title>Ordenar nombres</title></head>
<body>
<script language="javascript">
var nombres = new Array ();
i = 0;
do
{
	t = prompt("Introduce el nombre " + (i+1), "");
	if (t != null )
	{
		if (t.search(/\d/i) != -1) alert("Se introdujo un numero!\nIntentelo otra vez.");
		else nombres[i++] = t;
	}
}
while (t != null)
if (nombres.length == 0) alert("No se intrudujo ningun nombre!");
else
{
	document.write("Los nombres introducidos son: " +nombres + ", " +"<br>");
	document.write("Los nombres ordenados son: " +nombres.sort() + ", ");
}
</script>
</body>
</html> 
Si no entiendes algo, solo hasnoslo saber, y con mucho gusto te ayudaremos.
suerte
__________________
No repitamos temas, usemos el Motor de busquedas
Plantea bien tu problema: Ayúdanos a ayudarte.