-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontentWrite.html
More file actions
122 lines (108 loc) · 3.57 KB
/
Copy pathcontentWrite.html
File metadata and controls
122 lines (108 loc) · 3.57 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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="ko">
<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>Board Write</title>
<style>
*, html, body {margin: 0;padding: 0; box-sizing: border-box;}
h1 {
margin: 20px auto 10px auto;
text-align: center;
}
#tb-write {
margin: 0 auto;
border: 1px solid black;
border-collapse: collapse;
}
#tb-write tr>th,
#tb-write tr>td {
border: 1px solid black;
padding: 5px 10px;
text-align: center;
}
#tb-write span {
font-size: 15px;
}
#board_title {
width: 300px;
height: 25px;
}
#board_pwd {
height: 25px;
}
#tb-write tr:nth-child(2) td {
text-align: right;
}
#tb-write tr:nth-child(3) >td:first-child {
padding: 30px;
}
#tb-write tr:nth-child(3) >td:last-child {
padding: 0;
}
#text_content {
margin: 0;
border: none;
resize: none;
padding: 7px;
}
#btnSubmit {
padding: 3px 20px;
font-size: 15px;
background-color: lightblue;
border: 1px solid gray;
cursor: pointer;
}
</style>
</head>
<body>
<h1>입력</h1>
<hr><br>
<form id="form_content" method="post">
<table id="tb-write">
<tr>
<td colspan="2">
<span>제목 : </span>
<input type="text" name="board_title" id="board_title" placeholder="제목을 입력하세요.">
</td>
</tr>
<tr>
<td colspan="2">
<span>암호 : </span>
<input type="password" name="board_password" id="board_password" placeholder="비밀번호를 입력하세요.">
</td>
</tr>
<tr>
<td><span>내용</span></td>
<td>
<textarea name="board_content" id="text_content" cols="60" rows="35"></textarea>
</td>
</tr>
<tr>
<td colspan="2"><input type="button" id="btnSubmit" value="저장"></td>
</tr>
</table>
</form>
<script>
window.onload = function() {
board_title.focus();
btnSubmit.onclick = function() {
if(board_title.value.length == 0) {
alert('제목을 입력하세요.');
return;
}
else if(board_password.value.length == 0) {
alert('암호를 입력하세요.');
return;
}
else if(text_content.value.length == 0) {
alert('내용을 입력하세요.');
return;
}
form_content.submit();
}
};
</script>
</body>
</html>