Ver Mensaje Individual
  #5 (permalink)  
Antiguo 22/04/2010, 15:58
Avatar de DeveloperFresh
DeveloperFresh
 
Fecha de Ingreso: mayo-2009
Ubicación: Ancon City
Mensajes: 35
Antigüedad: 15 años
Puntos: 3
Respuesta: Como lo podria hacer.

Bueno quedaría así:

Código HTML:
Ver original
  1.  <head>
  2.   <title>A</title>
  3.  </head>
  4.  <body>
  5.   <form name="formu" id="formu" action="">
  6.    <input type="text" name="text1" id="text1" onblur="LostFoco(this)"  onfocus="Foco(this)">
  7.   </form>
  8.  </body>
  9. </html>


Código Javascript:
Ver original
  1. <script language="javascript" type="text/javascript">
  2.  function Foco(obj){
  3.   obj.style.backgroundColor='#0000FF';
  4.   obj.style.color='#FFFFFF';
  5. }
  6.  
  7. function LostFoco(obj){
  8.   obj.style.backgroundColor='#FFFFFF';
  9.   obj.style.color='#000000';
  10. }
  11. </script>


salu2