Prepínanie obrázkov vo fotogalérii javascriptom
Zdrojový kód:
<html><head><title>automobil</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta http-equiv="Content-Script-Type" content="text/javascript"/>
<style>
body, table, td, tr, p { margin: 0px; padding: 0px; border: 0px; }
</style>
<script language="JavaScript"><!--
foto=new Array();
popis=new Array();
foto[1]="f/fiat2.jpg";
popis[1]="fiat 127 - oheň a vietor";
foto[2]="f/fiat3.jpg";
popis[2]="fiat 127 - oheň a vietor";
foto[3]="f/kurca_na_aute.jpg";
popis[3]="fiat 127 - oheň a vietor";
foto[4]="f/moto_honda.jpg";
popis[4]="fiat 127 - oheň a vietor";
foto[5]="f/tatra2.jpg";
popis[5]="fiat 127 - oheň a vietor";
var x=1;
function nnext() {
x++;
if ( x >= foto.length )
x = 1;
eval("document.foto.src='"+foto[x]+"'");
// document.popis.text.value=popis[x];
}
function prev() {
x--;
if ( x <= 0 )
x = foto.length-1;
eval("document.foto.src='"+foto[x]+"'");
// document.popis.text.value=popis[x];
}
--></script></head>
<body bgcolor="#000000">
<p align=center><table border="0" cellspacing="0" cellpadding="0" width="601">
<tr align="left" valign="top">
<td height="33" width="1"></td>
<td height="33" width="600"></td>
</tr>
<tr align="left" valign="top">
<td width="1" height="450"></td>
<td align="center" width="600" height="450">
<img border="0" src="f/fiat2.jpg" alt="foto" name="foto"></td>
</tr>
<tr>
<td colspan=2 width="601" height="33"></td>
</tr>
<tr align="left" valign="top">
<td colspan=2 width="601" height="34">
<table border="0" cellspacing="0" cellpadding="0" width="601" height="33">
<tr align="left" valign="top">
<td width="1" height="33"></td>
<td rowspan="1" colspan="1" width="383" height="33">
<img border="0" width="383" height="33" src="i/text.png" alt=""></td>
<td rowspan="1" colspan="1" width="54" height="33"
onmouseover="document.images['prv'].src='i/prev_.png'" onmouseout="document.images['prv'].src='i/prev.png'">
<a href="#" onClick="prev(); return false;">
<img name="prv" border="0" width="54" height="33" src="i/prev.png" alt=""></a></td>
<td rowspan="1" colspan="1" width="104" height="33"
onmouseover="document.images['end'].src='i/end_.png'" onmouseout="document.images['end'].src='i/end.png'">
<a href="index.htm">
<img name="end" border="0" width="104" height="33" src="i/end.png" alt=""></a></td>
<td rowspan="1" colspan="1" width="59" height="33"
onmouseover="document.images['next'].src='i/next_.png'" onmouseout="document.images['next'].src='i/next.png'">
<a href="#" onClick="nnext(); return false;">
<img name="next" border="0" width="59" height="33" src="i/next.png" alt=""></a></td>
</tr>
</table>
</td>
</tr>
</table></p>
</body></html>
| Žiadne dokumenty ani odkazy k tejto stránke. | ||
Generátor typoscriptu
Vytvára typoscript pre bežné použitie. Generátor je jednoduchý na obsluhu, stačí vyplniť zopár položiek formulára.
