forked from bradtraversy/php_rest_myblog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ajaxCall.html
68 lines (54 loc) · 1.71 KB
/
ajaxCall.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" type="text/javascript"></script>
<script src="ajaxCall.js"></script>
<style>
body {
text-align: center;
font-family: "Helvetica", sans-serif;
}
h1 {
font-size: 2em;
font-weight: bold;
}
.box {
border-radius: 5px;
background-color: #eee;
padding: 20px 5px;
}
button {
color: white;
background-color: #4791d0;
border-radius: 5px;
border: 1px solid #4791d0;
padding: 5px 10px 8px 10px;
}
button:hover {
background-color: #0F5897;
border: 1px solid #0F5897;
}
</style>
</head>
<body>
<div style="float:left; width:50%;">
<h1>Data Finder</h1>
<p class="message box"> The message will go here </p>
<p><button id="getMessage"> Get Message </button></p>
</div>
<div style="float:right; width:50%;">
<h1>Data Sender</h1>
<form id="apiform">
<input type="text" name="title" placeholder="title" autocomplete="on" ><br>
<textarea name="body" id="" cols="30" rows="10" placeholder="body" autocomplete="on" ></textarea><br>
<input type="text" name="author" placeholder="author" autocomplete="on" ><br>
<input type="text" name="category_id" placeholder="category_id" autocomplete="on" ><br><br>
<button id="postMessage"> Post Message </button>
</form>
</div>
</body>
</html>