Ver Mensaje Individual
  #7 (permalink)  
Antiguo 24/01/2011, 11:41
Avatar de Perr0
Perr0
 
Fecha de Ingreso: mayo-2005
Ubicación: Santiago de Chile, Chile
Mensajes: 676
Antigüedad: 19 años
Puntos: 79
Respuesta: Cambiar campo de texto según texto :D

pero asi queda mas bonito

Código Javascript:
Ver original
  1. <script>
  2. var w="Bienvenido...";
  3. window.onload=function(){
  4.     t=document.getElementsByName("guelcom")[0];
  5.     if(t){
  6.         formato1();
  7.         t.onblur=function(){if(!this.value) {formato1();}};
  8.         t.onfocus=function(){if(this.value==w) {formato2();}};
  9.     }
  10.     function formato1(){
  11.         t.style.color="#ccc";
  12.         t.value=w;
  13.     }
  14.     function formato2(){
  15.         t.style.color="";
  16.         t.value="";
  17.     }
  18. }
  19. </script>
  20. <input type="text" name="guelcom" />

salu2
__________________
Numerador Mp3 en Access =)
http://www.mediafire.com/download/r9...pdw/mp3(2).zip