-
Notifications
You must be signed in to change notification settings - Fork 0
/
fryzura.html
100 lines (83 loc) · 2.96 KB
/
fryzura.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="pl">
<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>Usługi Fryzjerskie</title>
<link rel="stylesheet" href="./styl2.css">
</head>
<body>
<section class="lewy1">
<h2>
<a href="index.html">SALON FRYZJERSKI</a>
</h2>
<img src="./obraz2.jpg" alt="Czesanie">
</section>
<section class="prawy1">
<h2>MENU</h2>
</section>
<section class="prawy2">
<ol>
<li>
<a href="fryzura.html">Strzyżenie</a>
<ul>
<li>krótkie</li>
<li>średnie</li>
<li>półdługie</li>
<li>długie</li>
</ul>
</li>
<li>Czesanie</li>
<li>Koloryzacja</li>
</ol>
</section>
<section class="lewy2">
<h3>Dziś promocja na strzyżenie włosów</h3>
<form action="" class="form">
<div class="pole">
<input type="radio" value="krotkie" name="wybor" id="krotkie">
<label for="krotkie">Krótkie</label>
</div>
<div class="pole">
<input type="radio" value="srednie" name="wybor" id="srednie">
<label for="srednie">Średnie</label>
</div>
<div class="pole">
<input type="radio" value="poldlugie" name="wybor" id="poldlugie">
<label for="poldlugie">Półdługie</label>
</div>
<div class="pole">
<input type="radio" value="dlugie" name="wybor" id="dlugie">
<label for="dlugie">Długie</label>
</div>
</form>
<button id="przycisk">Odkryj promocję</button>
<p id="wynik"></p>
</section>
<section class="prawy3">
<img src="./obraz1.jpg" alt="Fryzjer">
</section>
<footer class="footer">Autor: 000000000</footer>
<script>
var btn = document.getElementById('przycisk');
var wynik = document.getElementById('wynik');
let wybor;
btn.addEventListener('click', () => {
var wyborinput = document.getElementsByName('wybor');
wyborinput.forEach(el => {
if (el.checked) {
wybor = el.value;
}
})
function showResult(price) {
wynik.innerHTML = "Cena strzyżenia " + price;
}
if (wybor === "krotkie") { showResult(25) }
if (wybor === "srednie") { showResult(30) }
if (wybor === "poldlugie") { showResult(40) }
if (wybor === "dlugie") { showResult(50) }
});
</script>
</body>
</html>