Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/10/2006, 06:14
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Hola karpoj23

Pon el textbox así: <input type="text" onkeyup = "validar(this)" />

y usa este código:
Código PHP:
function validar(obj) {
  
obj.value;
  if(
v.substr(0,1) != '0') {
    
'0'v;
    
obj.value v;
  }

Saludos,