-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (43 loc) · 1.11 KB
/
index.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
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function () {
$("h1").each(function () {
var form = $(this).closest("form");
$(this).prepend(form.attr("method") + " " + form.attr("action"));
});
$("form[method='GET']").on("submit", function () {
location.href = $(this).attr("action") + $(this).find("input").val();
return false;
});
$("form").append("<input type=\"submit\">");
});
</script>
<style>
h1 { margin: 0; }
h1 input { font-size: 1em; }
h2 { margin: 0; font-style: italic; font-weight: normal; }
</style>
</head>
<body>
<hr />
<form method="GET" action="http://localhost:7777/document/">
<h1></h1>
<h2>Fetch list of documents</h2>
</form>
<hr />
<form method="POST" action="http://localhost:7777/document/">
<h1></h1>
<h2>Create new document</h2>
<textarea name="document" rows="20" cols="80"></textarea>
<br />
</form>
<hr />
<form method="GET" action="http://localhost:7777/document/">
<h1><input size="5" value="1234" /></h1>
<h2>Fetch a document</h2>
</form>
<hr />
</body>
</html>