Ver Mensaje Individual
  #5 (permalink)  
Antiguo 05/02/2006, 15:17
Avatar de Cap.Buscapina
Cap.Buscapina
 
Fecha de Ingreso: octubre-2004
Ubicación: Argentina
Mensajes: 836
Antigüedad: 19 años, 6 meses
Puntos: 4
hola marybal, aunque como está
Cita:
<input name="<? print "nt3["."$j"."]";?>" type="text" id="<? print "nt3["."$j"."]";?>" value="" size="1" maxlength="2" onblur="verif(this)" onkeypress="return validar(event)">
debería funcionar fijate si te sirve esta funcion que hace todo de un solo paso:
Cita:
<html>
<head>
<script>
function verif(n){
if(isNaN(parseInt(n.value)) || n.value<0 || n.value>20){
alert("Solo se puede ingresar notas entre 0 y 20");
n.value="";
n.focus();
}
}
</script></head>
<body>
<form name="form1" method="post" action="">
<input name="notas" type="text" id="notas" onKeyUp="verif(this)">
<input type="submit" name="Submit" value="Enviar">
</form>
</body>
</html>
__________________
by Capitán Buscapina
.