chief: Ändern eines Bildes beim clicken

Beitrag lesen

Mein Quelltext für den linken Frame (also die Navigation) sieht ungefähr so aus:

<html>
<head>

<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">

<title>Navigation</title>
  <base target="mainFrame">

<script type="text/javascript">
Home = new Image();
Home.src = "Home.gif";     /* erste Standard-Grafik */
Home1 = new Image();
Home1.src = "Home1.gif"; /* erste Highlight-Grafik */

unserTeam = new Image();
unserTeam.src = "unserTeam.gif";     /* zweite Standard-Grafik */
unserTeam1 = new Image();
unserTeam1.src = "unserTeam1.gif"; /* zweite Highlight-Grafik */

Impressum = new Image();
Impressum.src = "Impressum.gif";     /* dritte Standard-Grafik */
Impressum1 = new Image();
Impressum1.src = "Impressum1.gif"; /* dritte Highlight-Grafik */

/* usw. fuer alle weiteren zu benutzenden Grafiken */

function Bildwechsel (Bildnr, Bildobjekt) {
  window.document.images[Bildnr].src = Bildobjekt.src;
}
  </script>
</head>

<body style="background-image: url(Himmel1.jpg);">

<table style="text-align: left; width: 197px; height: 323px;" border="0" cellpadding="2" cellspacing="2">

<tbody>

<tr align="center">

<td><a href="Home.html" onmouseover="Bildwechsel(0, Home1)" onmouseout="Bildwechsel(0, Home)"><img src="Home.gif" alt="Home" border="0" height="23" width="119"></a><br>

<a href="unser%20Team.html" onmouseover="Bildwechsel(9, unserTeam1)" onmouseout="Bildwechsel(9, unserTeam)"><img src="unserTeam.gif" alt="unserTeam" border="0" height="23" width="119"></a><br>

<a href="Impressum.html" onmouseover="Bildwechsel(10, Impressum1)" onmouseout="Bildwechsel(10, Impressum)"><img src="Impressum.gif" alt="Impressum" border="0" height="23" width="119"></a><br>

</td>

</tr>

</tbody>
</table>

<br>

</body>
</html>