Ver Mensaje Individual
  #2 (permalink)  
Antiguo 15/11/2008, 19:13
Avatar de TurKa
TurKa
 
Fecha de Ingreso: enero-2003
Ubicación: Gerli, Avellaneda
Mensajes: 543
Antigüedad: 21 años, 3 meses
Puntos: 4
Respuesta: formato de esta caja de texto en particular.

hola adiazq,
podés probar con el siguiente código:
Código HTML:
<script language="javascript" type="text/javascript">
function DarFormato() {
	cadena = document.getElementById('texto').value;
	if(cadena.length == 4) { 
		document.getElementById('texto').value += "-";
	} else if (cadena.length == 7) {
		document.getElementById('texto').value += "-";
	}
}
</script>
<form>
	<input type="text" name="nombreDelCampo" id="texto" onKeyUp="DarFormato()" />
</form> 
Espero que te sirva!
Saludos!!
__________________
Programación LAMP con Scrum y XP
www.eugeniabahit.com.com.ar