-
Notifications
You must be signed in to change notification settings - Fork 0
/
js57my.html
57 lines (38 loc) · 1.1 KB
/
js57my.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
section {
width: 550px;
height: 400px;
margin: 0 auto;
transition: 0.3s;
}
section:hover {
filter: brightness(80%);
}
</style>
</head>
<body>
<section>
<a id="h1" href="https://www.belarus.by/ru//"><img id="pic" src="images/img1b.jpg" alt=""></a>
</section>
<script>
let n = 1;
let p = 6;
to = ['https://ru.wikipedia.org/wiki/%D0%9C%D0%B8%D0%BD%D1%81%D0%BA', 'https://airport.by/', 'https://gorshochek.by/', 'http://beegood.by/', 'https://www.hotelminsk.by/', 'https://www.ya.ru'];
function changePic() {
if (n > p) n=1;
pic.src = `images/img${n}b.jpg`;
h1.href = to[n-1];
n++;
setTimeout(changePic, 2000);
}
addEventListener('load', changePic);
</script>
</body>
</html>