Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/11/2011, 05:29
Avatar de jor_0203
jor_0203
 
Fecha de Ingreso: octubre-2011
Ubicación: mexico
Mensajes: 760
Antigüedad: 13 años, 3 meses
Puntos: 8
Respuesta: saber el coor de fondo con javascript

encontré la solución
espero que les sirva


Código Javascript:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2.     <html xmlns="http://www.w3.org/1999/xhtml">
  3.     <head>
  4.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5.     <title>Documento sin t&iacute;tulo</title>
  6.     <script type="text/javascript">
  7.     function tt () {
  8.     a=document.getElementById("sa").style.backgroundColor;    
  9.     document.getElementById("contenedor").innerHTML = a;
  10.     }
  11.     </script>
  12.     </head>
  13.     <body>
  14.     <a href="#"   onclick="tt()">a</a>
  15.     <div id="contenedor">aqui colocar el valor del fondo de abajo</div>
  16.     <div id="sa" style="background-color:#006699; height:56px;">
  17.     como puedo colocar en el otro div el nombre de fondo que ocupa
  18.     </div>
  19.     </body>
  20.     </html>