Flere Roll-over knapper i samme script
HejJeg har dette script - men vil gerne ha at det skal styrer flere knapper end en'.
<SCRIPT language="javascript" type="text/javascript">
<!--
if (document.images) {
image1on = new Image(); image1on.src = "grafik/click.gif";
image1off = new Image(); image1off.src = "grafik/over.gif";
image1down = new Image(); image1down.src = "grafik/down.gif";
}
function turnOn(imageName) {
if (document.images) {
document[imageName].src = eval(imageName + "on.src");
}
}
function turnOff(imageName) {
if (document.images) {
document[imageName].src = eval(imageName + "off.src");
}
}
function turnDown(imageName) {
if (document.images) {
document[imageName].src = eval(imageName + "down.src");
}
}
//-->
</SCRIPT>
</head>
det skal så samarbejde med 3 stks:
<A HREF="grafik/oscarAsk.gif" target="info"
ONMOUSEOVER="turnOn('image1')"
ONMOUSEOUT="turnOff('image1')"
ONMOUSEDOWN="turnDown('image1')">
<IMG SRC="grafik/over.gif" NAME="image1" HEIGHT=30 WIDTH=30 BORDER=0></A>
Nogen der har nogen gode råd.
Venligst
Finmand