Probleme mit Ändern des td background

leszek

Grünschnabel
Hallo Leute !

Ich möchte Zeile background (Grafik) einer Tabelle ändern.
Habe das versucht, zeigt keine Fehler, aber es funktioniert nicht:

<html>
<head>
<script>
function aktiv(Nr)
{
eval('document.getElementById(Nr).style.backgroundImage.url = "botton_menu1.jpg"');
}
function normal(Nr)
{
eval('document.getElementById(Nr).style.backgroundImage.url = "botton_menu0.jpg"');
}
</script>

</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="156">
<tr>
<td id="1" onmouseover="aktiv(1);" onmouseout="normal(1);"><a href="" >Link</a><br>
</td>
</tr>
</table>
</body>
</html>

Bitte um Mithilfe !
 
Hi,

schreibe die Funktionen wie folgt um:
Code:
function aktiv(Nr){
	document.getElementById(Nr).style.backgroundImage = "url(botton_menu1.jpg)";
}
function normal(Nr){
	document.getElementById(Nr).style.backgroundImage = "url(botton_menu0.jpg)";
}
Ciao
Quaese
 
Zurück