Tema
:
input text que empieza por numero
Ver Mensaje Individual
#
2
(
permalink
)
18/10/2006, 06:14
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
) {
v
=
obj
.
value
;
if(
v
.
substr
(
0
,
1
) !=
'0'
) {
v
=
'0'
+
v
;
obj
.
value
=
v
;
}
}
Saludos,
__________________
Lee
las Políticas del Foro
y
escribe correctamente
.
JavierB
Ver Perfil
Buscar todos los Mensajes de JavierB