-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslideshow4.html
More file actions
49 lines (45 loc) · 1.17 KB
/
Copy pathslideshow4.html
File metadata and controls
49 lines (45 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<title>SlideShow Demo</title>
<script type="text/javascript">
img_array=new Array ("images.jpg","irctc.jpg","amezon1.jpg");
url = ["https://msbte.org.in/", "https://www.irctc.co.in/nget/train-search", "https://www.amazon.in/"];
// those images which are inside the same folder so we need to give its whole path we can just specify its extention followed by imagename
var img=0;
function previous()
{
img--;
if(img<0)
{img=(img_array.length-1);
}
show();
}
function next()
{
if(img==url.length)
{
img =0;
}
show();
img++;
}
function show()
{
document.getElementById("myurl").href=url[img];
document.slide.src=img_array[img];
window.setInterval("next()",3000);
}
</script>
</head>
<body onload ="window.setInterval(next(),3000);">
<center>
<a href = "" id ="myurl">
<img src="amezon1.jpg" width="400" height="220" name="slide">
</a>
<br><br>
<input type="button" value="Previous" onclick="previous()">
<input type="button" value="Next" onclick="next()">
<center>
</body>
</html>