blob: 99fd6f4af8bbce305b03db681430e796af43453e (
plain)
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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Guestbook with CAPTCHA</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
form {
margin-bottom: 20px;
}
input, textarea {
width: 100%;
padding: 10px;
margin: 10px 0;
box-sizing: border-box;
}
button {
padding: 10px 20px;
cursor: pointer;
}
.entry {
border-bottom: 1px solid #ccc;
padding: 10px 0;
}
.entry h4 {
margin: 0 0 5px;
}
.entry p {
margin: 0;
}
.captcha {
display: flex;
align-items: center;
margin: 10px 0;
}
.captcha img {
margin-right: 10px;
}
</style>
</head>
<body>
<h1>Guestbook</h1>
<form id="guestbook-form">
<input type="text" id="name" placeholder="Your Name" required>
<textarea id="message" placeholder="Your Message" required></textarea>
<div class="captcha">
<img id="captcha-image" src="" alt="CAPTCHA" title="CAPTCHA">
<button type="button" id="refresh-captcha">🔄</button>
</div>
<input type="text" id="captcha-input" placeholder="Enter CAPTCHA" required>
<button type="submit">Submit</button>
</form>
<div id="guestbook-entries"></div>
<script src="guestbook.js"></script>
</body>
</html>
|