Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/04/2010, 13:51
Avatar de _cronos
_cronos
 
Fecha de Ingreso: abril-2010
Mensajes: 135
Antigüedad: 14 años, 1 mes
Puntos: 1
Respuesta: Como lo podria hacer.

¿Tú te refieres a algo 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" onfocus="color()">
  7.   </form>
  8.  </body>
  9. </html>

Código Javascript:
Ver original
  1. <script language="javascript" type="text/javascript">
  2.  function color(){
  3.   document.getElementById("text1").style.backgroundColor='#0000FF';
  4.   document.getElementById("text1").style.color='#FFFFFF'}
  5. </script>