-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
51 lines (45 loc) · 1.75 KB
/
index.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
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<style>
body {
margin: 20px;
background-color: #edf7f0;
}
</style>
<body>
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 col-md-offset-3">
<img class="img-responsive" src="./images/left.png" id="img" width="400" height="400" alt="image not loaded"/>
</div>
</div>
<br><br>
<div class="row">
<div class="col-md-6 col-sm-6 col-md-offset-3 text-center">
<button class="btn btn-info" id="left" onclick="leftClick();">Left</button>
<button class="btn btn-info" id="right" onclick="rightClick();">Right</button>
</div>
</div>
<div>
<script>
function leftClick() {
let img = document.getElementById("img");
img.src = "./images/left.png";
}
/*function upClick() {
let img = document.getElementById("img");
img.src = "./images/up.png";
img.height = 400;
}*/
function rightClick() {
let img = document.getElementById("img");
img.src = "./images/right.png";
}
</script>
</body>
</html>