Ver Mensaje Individual
  #5 (permalink)  
Antiguo 29/05/2005, 08:20
Avatar de pereztroff
pereztroff
 
Fecha de Ingreso: junio-2002
Ubicación: En la Internet.
Mensajes: 4.068
Antigüedad: 21 años, 11 meses
Puntos: 5
no muestra nada y modifique el codigo de esta manera:

<head> <title> prueba edades </title>

<Script Language="JavaScript">
function mayor(edad)
{

if ( parseInt(document.nombreForm.nombreTxt.value) >= 18)
alert('Mayor');
else
alert('Menor');
}
</script>
</head>
<body>
texto:
<input type="text" name="nombre">
<br>
<input type="button" value="Calcular"
onClic="mayor(this)">
</body>
</html>