Hallo,
wieso geht das nicht?
das feld soll die bilder rot und grün nacheinander wechseln, nach jedem mouseover. hab extra alerts eingebaut um zu gucken obs geht.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>????</title>
</head>
<body style="font-family: Arial; margin-left: 10px; margin-top: 10px" Onload="set()">
<SCRIPT type="text/javascript">
<!--
function set()
{
bild = 'red';
}
function move()
{
if(bild == 'green')
{
alert("grün auf rot");
img01.src = 'red.gif'; //wechselt grün auf rot
bild = 'red';
}
else
{
alert("rot auf grün");
img01.scr = 'green.gif'; //wechselt rot auf grün
bild = 'green';
}
}
//-->
</SCRIPT>
<img id="img01" border="0" src="x.gif" width="113" height="108" onMouseOver="move()">
</body>
</html>
was stimmt nicht?
zum anschauen:
http://www.michaelwoelk.de/rever/test.htm
MfG
Michael Wölk