-
Notifications
You must be signed in to change notification settings - Fork 0
/
slide_show.html
64 lines (40 loc) · 1.83 KB
/
slide_show.html
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
50
51
52
53
54
55
56
57
58
59
60
<html>
<head>
<title>Slide Show</title>
<script type="text/javascript">
var images = [];
images[0] = "http://www.gracefellowshipofaugusta.com/hp_wordpress/wp-content/uploads/2016/01/one-706897_640.jpg";
images[1] = "http://cliparwolf.com/images/2/2-05.jpg";
images[2] = "http://www.psdgraphics.com/file/red-number-3.jpg";
images[3] = "http://iconboxingclub.com/wp-content/uploads/2011/12/red-number-4.jpg";
images[4] = "http://americasrealdeal.com/blog/wp-content/uploads/2015/05/5.jpg";
var i = 0;
function slideShowForward(){
var myImage = document.getElementById("imageID");
if (i==4){
i=0;
}
else{
i++;
}
myImage.src = images[i];
}
function slideShowBack(){
var myImage = document.getElementById("imageID");
if (i==0){
i=4;
}
else{
i--;
}
myImage.src = images[i];
}
</script>
</head>
<body>
<img src="http://www.gracefellowshipofaugusta.com/hp_wordpress/wp-content/uploads/2016/01/one-706897_640.jpg" id="imageID" width="100" height="200">
<button onclick="slideShowBack()">Previous</button>
<button onclick="slideShowForward()">Next</button>
</br></br><a href=/~ahutton>Back to Home</a>
</body>
</html>