Галерия с javascript
Една много малка но перфектна галерия с javascripts и първо трябва да сложим един код в вашата страница между <head> и </head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin


var Onerotate_delay = 2000; // delay in milliseconds (5000 = 5 secs)
Onecurrent = 0;
var OneLinks = new Array(3);
OneLinks[0] = "http://web-tourist.net"; /тук линковете към картинките каде да водят
OneLinks[1] = "http://free-zona.net";
OneLinks[2] = "http://wthost.net";
function Onenext() {
if (document.Oneslideform.Oneslide[Onecurrent+1]) {
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent+1].value;
document.Oneslideform.Oneslide.selectedIndex = ++Onecurrent;
}
else Onefirst();
}
function Oneprevious() {
if (Onecurrent-1 >= 0) {
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent-1].value;
document.Oneslideform.Oneslide.selectedIndex = --Onecurrent;
}
else Onelast();
}
function Onefirst() {
Onecurrent = 0;
document.images.Oneshow.src = document.Oneslideform.Oneslide[0].value;
document.Oneslideform.Oneslide.selectedIndex = 0;
}
function Onelast() {
Onecurrent = document.Oneslideform.Oneslide.length-1;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
}
function Oneap(text) {
document.Oneslideform.Oneslidebutton.value = (text == "Stop") ? "Start" : "Stop";
Onerotate();
}
function Onechange() {
Onecurrent = document.Oneslideform.Oneslide.selectedIndex;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
}
function Onerotate() {
if (document.Oneslideform.Oneslidebutton.value == "Stop") {
Onecurrent = (Onecurrent == document.Oneslideform.Oneslide.length-1) ? 0 : Onecurrent+1;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
window.setTimeout("Onerotate()", Onerotate_delay);
}
}
function Onetransport(){
window.location=OneLinks[Onecurrent]
}
// End -->
</SCRIPT>


и ето и останалата част :

<TABLE border="0" cellspacing="0" cellpadding="0">
<TR>
<TD>
<form name="Oneslideform" >
<DIV align="center">
<TABLE width="150" border="1" cellspacing="0" cellpadding="4" bordercolor="#330099">
<TR>
<TD bgcolor="#330099">
<DIV align="center"><B><FONT color="#FFFFFF">Image Slideshow</FONT></B></DIV>
</TD>
</TR>
<TR>
<TD bgcolor="#FFFFFF">
<DIV align="center"><A href="javascript:Onetransport()"><IMG src="slideimage1.gif" width="90" height="90" name="Oneshow" border="0"></A></DIV>
</TD>
</TR>
<TR>
<TD bgcolor="#330099">
<DIV align="center">
<SELECT name="Oneslide" onChange="Onechange();">
<OPTION value="slideimage1.gif" selected>Image 1</OPTION>/тук пишете линка към картинката дето ще се показва и товеа Image 1 , Image 2 и т.н. е името на картинката
<OPTION value="slideimage2.gif">Image 2</OPTION>
<OPTION value="slideimage3.gif">Image 3</OPTION>
</SELECT>
</DIV>
</TD>
</TR>
<TR>
<TD bgcolor="#330099">
<DIV align="center">
<INPUT type=button onClick="Oneprevious();" value="<<" title="Previous">
<INPUT type=button name="Oneslidebutton" onClick="Oneap(this.value);" value="Start" title="AutoPlay">
<INPUT type=button onClick="Onenext();" value=">>" title="Next">
</DIV>
</TD>
</TR>
</TABLE>
</DIV>
</form>
</TD>
</TR>
</TABLE>




демо :
http://www.free-zona.net/web-tourist/galery/galery.html

/ Трябва да сте регистриран за да напишете коментар /