Ik heb dit:
<script type="text/javascript" language="JavaScript">
button1off = new Image(); button1off.src = "images/euro_01.jpg";
button1on = new Image(); button1on.src = "images/euro_02.jpg";
button2off = new Image(); button2off.src = "images/euro_03.jpg";
button2on = new Image(); button2on.src = "images/euro_04.jpg";
button3off = new Image(); button3off.src = "images/euro_05.jpg";
button3on = new Image(); button3on.src = "images/euro_06.jpg";
function highlight(button) {
document[button].src = eval(button + "on.src");
}
function fade(button) {
document[button].src = eval(button + "off.src");
}
</script>
[img]"images/euro_01.jpg"[/img]<br>
[img]"images/euro_03.jpg"[/img]<br>
[img]"images/euro_05.jpg"[/img]
Maar hij geeft een error als ik op een van de 3 afbeeldingen wijs.
Het Script zelf moet in de body staan ivm m'n opmaak.
<script type="text/javascript" language="JavaScript">
button1off = new Image(); button1off.src = "images/euro_01.jpg";
button1on = new Image(); button1on.src = "images/euro_02.jpg";
button2off = new Image(); button2off.src = "images/euro_03.jpg";
button2on = new Image(); button2on.src = "images/euro_04.jpg";
button3off = new Image(); button3off.src = "images/euro_05.jpg";
button3on = new Image(); button3on.src = "images/euro_06.jpg";
function highlight(button) {
document[button].src = eval(button + "on.src");
}
function fade(button) {
document[button].src = eval(button + "off.src");
}
</script>
[img]"images/euro_01.jpg"[/img]<br>
[img]"images/euro_03.jpg"[/img]<br>
[img]"images/euro_05.jpg"[/img]
Maar hij geeft een error als ik op een van de 3 afbeeldingen wijs.
Het Script zelf moet in de body staan ivm m'n opmaak.