Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/09/2003, 01:32
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Hola, bhonox.

Esto creo que te servirá:
Código PHP:
<html>

<
head>
<
script>
function 
inserta(obj) {
    
cad=obj.value;
    
c1=cad.substr(0,2);
    
c2=cad.substr(2,4);
    
obj.value=c1+'-'+c2;
}
</script>
</head>

<body>
<input type="text" onBlur="inserta(this)">
</body>

</html> 
Saludos,