PPils: getElementById alternative

Beitrag lesen

thx aber eine sache noch,

mein script sieht jetzt so aus, die ersten zeilen...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript">

function changelayout(num) {
colors = new Array("#9A1B22","#AEA387","#878F39","#747A92","#9B8065","#CDBD5B");

window.document.getElementById("bg_color").style.background-color = colors[num];
window.document.getElementById("bgpic").background ="backgroundhtml_" + (num+1) + ".jpg";
}

</script>
<title>  ||LEISURE SHOOTS||  </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body id="bg_color" style="background-color:#9A1B22">

allerdings wechselt er die farben nicht...wo ist mein fehler..???