Hi!
Ich versuche einen einfachen Mouseover-Effekt mit JavaScript zu machen. Aber das klappt nicht. Woran liegt es? Ich finde den Fehler nicht! Könnt ihr mir vielleicht helfen?
Hier der Quelltext:
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
function show_top_img(box){
document.getElementById(box).src = "bilder/" + box + "_hover.png";
}
function hide_top_img(box){
document.getElementById(box).src = "bilder/" + box + ".png";
}
</script>
</head>
<body>
<div style="width:699px; margin:0 auto 0 auto;">
<div style="margin-right:0; padding:0; background-color:#FFFFFF;">
<img src="bilder/gal.png" id="gal" width="150" height="96" onmouseover="show_top_img('gal')" onmouseout="hide_top_image('gal')" alt="">
<img src="bilder/scripts.png" id="scripts" width="150" height="96" onmouseover="show_top_img('scripts')" onmouseout="hide_top_image('srcipts')" alt="">
<img src="bilder/art.png" id="art" width="150" height="96" onmouseover="show_top_img('art')" onmouseout="hide_top_image('art')" alt="">
</div>
</div>
</body>
</html>
Vielen Dank für euer Bemühen und für eure Hilfe!
Gruß, Markus