Tema: color click
Ver Mensaje Individual
  #9 (permalink)  
Antiguo 18/11/2004, 11:00
Avatar de spider_boy
spider_boy
 
Fecha de Ingreso: diciembre-2003
Ubicación: Chile
Mensajes: 1.855
Antigüedad: 21 años, 3 meses
Puntos: 89
mira, me pasaron este código para cambiar de colores las tablas al pasar el mouse por encima...
Código:
<SCRIPT LANGUAGE="JavaScript">
<!--

function cambiar(highlightcolor) {
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function original(originalcolor) {
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}
//-->
</SCRIPT>