-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgive2.html
More file actions
87 lines (77 loc) ยท 3.61 KB
/
give2.html
File metadata and controls
87 lines (77 loc) ยท 3.61 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
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/default.css">
<link rel="stylesheet" href="../css/style.css?ver=18">
<link rel="stylesheet" type="text/css" href="main.css">
<title>๊ธ๋ฑ๋ก</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
$.get("http://15.164.210.143/give2.php", function (data, status) {
// 'data' contains the output of board.php
$("#result").html(data);
})
.fail(function (jqXHR, textStatus, errorThrown) {
console.error('AJAX request failed: ' + textStatus + ', ' + errorThrown);
});
});
</script>
</head>
<body>
<div style="width: 374px; height: 900px; left: 8px; top: 10px; position: absolute">
<div style="width: 374px; height: 53px; left: 0px; top: 0px; position: absolute">
<div
style="width: 390px; height: 53px; left: 0px; top: 0px; position: absolute; background: #0032A0; box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); border-radius: 10px">
</div>
<div
style="left: 51px; top: 6px; position: absolute; text-align: center; color: white; font-size: 19px; font-family: Noto Sans KR; font-weight: 400; line-height: 40px; word-wrap: break-word">
๋ถ์ค๋ฌผ ๊ฒ์ํ</div>
<br><br><br>
<form id="myForm" action="#" method="POST" enctype="multipart/form-data">
<section>
<div class="mainCon">
<div class="writeTitle"><h3>๊ธ ๋ฑ๋กํ๊ธฐ</h3></div>
<input class="writeTypeText" style="height:35px; border-radius: 5px;" type="text" name="title" size="53" placeholder="์ ๋ชฉ์ ์
๋ ฅํด์ฃผ์ธ์" required></p>
<div class="writeTextarea"><h3>์์ธํ ์ค๋ช
</h3></div>
<textarea class="writeTextarea" style="width:390px; height:100px; border-color: black;border-radius: 5px;" name="story" placeholder="๋ณธ๋ฌธ์ ์
๋ ฅํด์ฃผ์ธ์" required></textarea>
<input type="file" style="margin-top: 10px;" name="image">
<input type="button" value="์ทจ์" style="margin-left:20%;" onclick="history.back(1)">
<br><br><br>
<input type="button" id="submit" value="์์ฑ์๋ฃ" style="margin-left: 39%; font-size: medium; color:white; width: 100px; height: 75%; background: rgba(0, 40, 128, 0.80); box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); border-radius: 5px">
</div>
</section>
</form>
<!-- ์ ์ฅ๋ ์ด๋ฏธ์ง๋ฅผ ํ์ํ๋ ๋ถ๋ถ -->
<div id="imageDisplay">
</div>
<script>
$(document).ready(function () {
$("#submit").click(function () {
var formData = new FormData($("#myForm")[0]);
$.ajax({
url: 'http://15.164.210.143/give2.php',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (data) {
if (data.success) {
alert(data.success);
}
},
error: function (jqXHR) {
var errorData = JSON.parse(jqXHR.responseText);
if (errorData.error) {
alert(errorData.error);
} else {
alert('์ด๋ฏธ์ง ์
๋ก๋์ ์คํจํ์ต๋๋ค.');
}
}
});
});
});
</script>
</body>
</html>