Ver Mensaje Individual
  #5 (permalink)  
Antiguo 14/11/2005, 08:22
Avatar de Saruman
Saruman
 
Fecha de Ingreso: mayo-2003
Ubicación: Panama city, Panama, Panama
Mensajes: 1.154
Antigüedad: 21 años, 9 meses
Puntos: 5
Cita:
Iniciado por el_caNela
pd: y si quisiera que en ved de darle al boton, quiero que lo haga automaticamente al quitar el foco del campo?
asi:

Código HTML:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<script language="javascript">
function Titulo(obj) {
var obj_s = obj.value.split(" ");
 
for (i=0; i < obj_s.length; i++) {
primera_letra = obj_s[i].substring(0, 1).toUpperCase();
obj_s[i] = primera_letra + obj_s[i].substring(1, obj_s[i].length);
}
 
obj.value = obj_s.join(" ");
}
</script>
<input type="text" name="titulo" id="titulo" value="" onBlur="Titulo(this)">
<input type="button" value="Cambiar Imagen" onClick="Titulo()">
</body>
</html> 
pd. jejejeje Cap.Buscapina lo mismo la verdad
saludos a ambos
__________________
Saruman

One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.