-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (34 loc) · 1.21 KB
/
index.html
File metadata and controls
38 lines (34 loc) · 1.21 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="Style/style1.css">
</head>
<body>
<h1 class="title">TITOLO</h1>
<button onclick="cambiaImmagine()">Cambia Immagine</button>
<div class="content">
<div class="image-container">
<img class="image" src="img/imm.jpg" alt="Descrizione immagine">
</div>
<div class="description">
<h2>Breve Descrizione</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.
Officia a reprehenderit commodi, porro exercitationem
labore deleniti sunt placeat fugit voluptates quo neque
mollitia officiis temporibus magni dolore et totam sit.</p>
</div>
</div>
<script>
var immagini = ["img/imm.jpg", "img/pizza.jpg"];
var index = 0;
function cambiaImmagine() {
document.getElementById(immagini[index]).style.display = 'none';
index = index * -1;
document.getElementById(immagini[index]).style.display = 'block';
}
</script>
</body>
</html>