WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   [HTML] Tabelle bei rollover Farbe ändern? (http://www.wcm.at/forum/showthread.php?t=111383)

str1ker 07.10.2003 20:11

[HTML] Tabelle bei rollover Farbe ändern?
 
Wie kann ich in HTML (od. CSS) wenn ich über eine Zelle einer Tabelle fahre die Farbe und den Rahmen ändern?

Das ist doch irgendwie möglich oder?

Danke im Vorraus!

jonix 07.10.2003 21:20

loesung: javascript.
Code:

<SCRIPT language="javascript">
/**
 * @param  textfarbe
 * @param  hintergrundfarbe
 * @param  cursor-style
**/
function aendereFarbe(obj, textfarbe, hintergrund, cursor)
{
  if (!(document.layers && !document.getElementById))
  {
    if (obj.children)
      obj.children[0].style.color = textfarbe;
    if (colorBg != '')
      obj.style.backgroundColor = hintergrund;
    if (cursor != '')
      obj.style.cursor = cursor;
  }
}
</SCRIPT>

...
<TR onMouseOver="aendereFarbe(this,'','#E4EEE5','');" onMouseOut="aendereFarbe(this,'','#D3DED4','');">
...



Alle Zeitangaben in WEZ +2. Es ist jetzt 07:46 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag