-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcreateMemberForm.html
More file actions
74 lines (63 loc) · 2.22 KB
/
createMemberForm.html
File metadata and controls
74 lines (63 loc) · 2.22 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
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
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title> 주문</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<style>
body {
background-color: #f8f9fa;
}
.container {
max-width: 500px;
margin: 50px auto;
padding: 20px;
background: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h2 {
text-align: center;
margin-bottom: 20px;
}
.form-group label {
font-weight: bold;
}
.btn-primary {
width: 100%;
}
</style>
</head>
<body>
<div class="container">
<h2>상품 주문</h2>
<form action="/members/new" method="post">
<div class="form-group">
<label for="name">이름</label>
<input type="text" class="form-control" id="name" name="name" placeholder="이름을 입력하세요." required>
<label for="address">배송 주소</label>
<input type="text" class="form-control" id="address" name="address" placeholder="주소를 입력하세요." required>
</div>
<button type="submit" class="btn btn-primary">주문하기</button>
</form>
</div>
<!-- /container -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const words = ['칫솔', '청소기', '치약', '세제', '바구니', '향수'];
function getRandomWord() {
const randomIndex = Math.floor(Math.random() * words.length);
return words[randomIndex];
}
function updateTitle() {
const randomWord = getRandomWord();
const h2Element = document.querySelector('.container h2');
if (h2Element) {
h2Element.textContent = `${randomWord} 주문`;
}
}
updateTitle();
});
</script>
</body>
</html>