Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/11/2008, 10:55
Avatar de Fernand0
Fernand0
 
Fecha de Ingreso: septiembre-2005
Ubicación: Buenos Aires
Mensajes: 610
Antigüedad: 21 años, 1 mes
Puntos: 19
Respuesta: validar caja de texto numerico con un valor maximo y minimo

Código HTML:
<input type="text" onKeypress="controlar(this, event);"  maxlength="70"> 
Código PHP:
function controlar(obj, event)
{
if (
event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;
if(
obj.value.length>=28) alert('ya no es menor a 28');
}