Mjchael: Background-Color per CSS verändern

Ich habe folgendes Problem:

Ich habe eine Html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" media="screen" href="../css/style.css" />
</head>
<body>
...

in der externen CSS steht
body{
   background-color:#003C81;
}

Zum Testen würde ich gerne die Hintergrundfarbe schnell per
Java-Script und A-Tag ändern.

Alle Variationen die ich schon ausprobiert habe funktionieren einfach nicht, und ich suche mich fast dumm und dämlich..

document.bgColor=farbe;
document.body.style.bgcolor=farbe;

und zig andere Varianten habe ich schon ausprobiert.

  1. hi,

    document.bgColor=farbe;
    document.body.style.bgcolor=farbe;

    Was hast du denn an http://de.selfhtml.org/javascript/objekte/style.htm#style_eigenschaften nicht verstanden?

    gruß,
    wahsaga

    --
    /voodoo.css:
    #GeorgeWBush { position:absolute; bottom:-6ft; }