Michael Nagler: Hintergrund ändern

Beitrag lesen

Hallo,

könnte so gehen:

<script language="JavaScript" type="text/javascript" >
<!--
var active = null; // hier wird das aktive tdback gesichert

function ChgBackColor(tdback,color)
{
  tdback.style.backgroundColor=color;
}

function BackColor(tdback,act)
{
  if(act == "click")
  {
    var color = "#00ff00";
    if( active != null )
    {
      ChgBackColor(active,"#bbbbbb");
    }
    active = tdback;
    ChgBackColor(tdback,color);
  }

if(act == "over" && tdback != active)
  {
    var color = "#8C8C8C";
    ChgBackColor(tdback,color)
  }

if(act == "out" && tdback != active)
  {
    var color = "#bbbbbb";
    ChgBackColor(tdback,color)
  }

}
// -->
</script>

Mit freundlichen Grüßen,
Michael Nagler