forked from YeeYoungHan/cpphttpstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.html
More file actions
64 lines (54 loc) · 1.71 KB
/
Copy pathpost.html
File metadata and controls
64 lines (54 loc) · 1.71 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
<html>
<head>
<title>게시글 추가</title>
<meta charset="UTF-8">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<div class="container">
<div style="margin-top:20px"></div>
<form action="post.html" method="post" class="form-horizontal">
<div class="form-inline form-group" >
<label for="num" class="col-sm-2 control-label">제목:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="subject" name="subject" size="60">
</div>
</div>
<div class="form-inline form-group" >
<label for="num" class="col-sm-2 control-label">내용:</label>
<div class="col-sm-10">
<textarea class="form-control" id="content" name="content" rows="10" cols="62"></textarea>
</div>
</div>
<div class="form-inline form-group" >
<div class="col-sm-offset-3 col-sm-3">
<button class="btn btn-default" type="submit" >
<span class="glyphicon glyphicon-ok"></span> 저장
</button>
<button class="btn btn-default" type="button" onclick="window.location='list'">
<span class="glyphicon glyphicon-remove"></span> 취소
</button>
</div>
</div>
</form>
</div>
<script>
$("form").submit( function() {
var strSubject = $("#subject").val();
var strContent = $("#content" ).val();
if( strSubject.length == 0 )
{
alert("제목을 입력해 주세요!!!")
return false;
}
if( strContent.length == 0 )
{
alert("내용을 입력해 주세요!!!")
return false;
}
return true;
} );
</script>
</body>
</html>