-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslideshow2.html
More file actions
37 lines (36 loc) · 942 Bytes
/
Copy pathslideshow2.html
File metadata and controls
37 lines (36 loc) · 942 Bytes
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
<!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
img=0;
function DisplayImg(num)
{
img=img+num;
if(img>img_array.length-1)
{
img=0;
}
if (img<0)
{
img=img_array.length-1;
}
document.getElementById("myurl").href=url[img];
document.slide.src=img_array[img];
}
</script>
</head>
<body>
<center>
<a href = "" id ="myurl">
<img src="amezon1.jpg" width="400" height="220" name="slide">
</a>
<br><br>
<input type="button" value="Previous" onclick="DisplayImg(-1)">
<input type="button" value="Next" onclick="DisplayImg(1)">
<center>
</body>
</html>