Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/04/2003, 11:48
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Hola, altraun.

Prueba este código:
Código PHP:
<html>
<
head>
<
script>
function 
validar(e){
tecla = (document.all) ? e.keyCode e.which;
if ((
tecla<48 || tecla>57) && tecla!=46 && tecla!=44) return false
}
</script>

</head>

<body bgcolor="#FFFFFF" text="#000000">

<input type="text" name="textfield" onKeyPress="return validar(event)">
</body>
</html> 
Saludos,