forked from luka2257/QuestionWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
88 lines (85 loc) · 1.94 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Question Box</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
.container {
max-width: 500px;
margin: 100px auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: center;
}
h2 {
color: #333;
}
.question {
margin-bottom: 20px;
}
.answer-btn {
display: inline-block;
padding: 10px 20px;
margin: 0 10px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}
.close-btn {
display: block;
margin-top: 20px;
padding: 10px 20px;
background-color: #dc3545;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<h2>Spørgsmål om livet:</h2>
<div class="question">
<p>Er du til pølser?</p>
</div>
<button class="answer-btn" onclick="answer1(this)">Ja</button>
<button class="answer-btn" onclick="answer2(this)">Nej</button>
<button class="close-btn" onclick="closeContainer(this)">Luk vindue</button>
</div>
<script>
function answer1(btn) {
if (btn.textContent == "Ja") {
btn.textContent = "MMhh, pølle pølle";
} else {
window.location.replace("asd.html");
}
}
function answer2(btn) {
if (btn.textContent == "Nej") {
btn.textContent = "Pøls hele dagen";
} else {
window.location.replace("asd.html");
}
}
function closeContainer(btn) {
if (btn.textContent == "Luk vindue") {
btn.textContent = "Pøls er min livret";
} else {
window.location.replace("asd.html");
}
}
</script>
</body>
</html>