-
Notifications
You must be signed in to change notification settings - Fork 0
/
part2.html
48 lines (37 loc) · 1.07 KB
/
part2.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Lab_2</title>
<style>
.first {
float: left;
width: 210px;
padding: 5px;
}
</style>
<script>
function makeCounter() {
let count = 0;
return function () {
return count++;
}
}
function counter() {console.log("За котів"); makeCounter();}
function counter2() { console.log("За собак"); makeCounter(); }
</script>
</head>
<body>
<h1>Практична робота №2</h1>
<p>Макаренко Наталія, студентка 2 курсу, група ЗПІ-зп03
<h2>Коти проти Собак</h2>
<div>
<div class="first" >
<button type="button" id="Cat" onclick="counter()" ><img src="Cat.jpg" width = "175px"></button>
</div>
<div class="first">
<button type="button" id="Dog" onclick="counter2()" ><img src="Dog.jpg"width = "200px"></button>
</div>
</div>
</body>
</html>