Knapper
Hvordan ændre jeg knapper til et gif i det her scriptKode:
<!-- JavaKodeSlide start -->
<HEAD>
<SCRIPT LANGUAGE=\"JavaScript\">
<!-- Original: Ricocheting (ricocheting@hotmail.com) -->
<!-- Web Site: http://www.ricocheting.com -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var rotate_delay = 2000; // delay in milliseconds (1000 = 1 secs)
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
}
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
}
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == \"Stop\") ? \"Start\" : \"Stop\";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidebutton.value == \"Stop\") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout(\"rotate()\", rotate_delay);
}
}
// End -->
</script>
</HEAD>
<!-- JavaKodeSlide slut -->
<center>
<form name=slideform>
<table>
<tr>
<td align=center bgcolor=\"white\">
</td>
</tr>
<tr>
<td align=center bgcolor=\"white\" width=200 height=150>
<img src=\"<%=rs(\"Foto1\")%>\" name=\"show\" width=\"255\">
</td>
</tr>
<tr>
<td align=center bgcolor=\"#C0C0C0\">
<select name=\"slide\" onChange=\"change();\">
<option value=\"<%=rs(\"Foto1\")%>\" selected>Foto1
<option value=\"<%=rs(\"Foto2\")%>\">Foto2
<option value=\"<%=rs(\"Foto3\")%>\">Foto3
<option value=\"<%=rs(\"Foto4\")%>\">Foto4
<option value=\"<%=rs(\"Foto5\")%>\">Foto5
<option value=\"<%=rs(\"Foto6\")%>\">Foto6
<option value=\"<%=rs(\"Foto7\")%>\">Foto7
<option value=\"<%=rs(\"Foto8\")%>\">Foto8
<option value=\"<%=rs(\"Foto9\")%>\">Foto9
<option value=\"<%=rs(\"Foto10\")%>\">Foto10
<option value=\"<%=rs(\"Foto11\")%>\">Foto11
<option value=\"<%=rs(\"Foto12\")%>\">Foto12
</select>
</td>
</tr>
<tr>
<td align=center bgcolor=\"#C0C0C0\">
<input type=button onClick=\"first();\" value=\"|<<\" title=\"Beginning\">
<input type=button onClick=\"previous();\" value=\"<<\" title=\"Previous\">
<input type=button name=\"slidebutton\" onClick=\"ap(this.value);\" value=\"Start\" title=\"AutoPlay\">
<input type=button onClick=\"next();\" value=\">>\" title=\"Next\">
<input type=button onClick=\"last();\" value=\">>|\" title=\"End\">
</td>
</tr>
</table>
</form>
</center>
