-
Notifications
You must be signed in to change notification settings - Fork 0
/
feta.html
66 lines (62 loc) · 2.46 KB
/
feta.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
63
64
65
66
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css"
integrity="sha384-cg6SkqEOCV1NbJoCu11+bm0NvBRc8IYLRGXkmNrqUBfTjmMYwNKPWBTIKyw9mHNJ" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/grids-responsive-min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
div.content {
max-width: 600px;
margin: auto;
padding: 2em;
}
</style>
<title>你的答案</title>
</head>
<body>
<div class="content">
<div class="pure-g">
<div class="pure-u-1">
<h1>你的答案</h1>
<p>v1.0 <a href="https://eleutheria.tech/archives/299/">必读说明</a> © 2020 <a
href="https://eleutheria.tech/">人間夜行</a>
</p>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1">
<h2>询问处</h2>
<form class="pure-form">
<fieldset>
<input type="text" id="frage" placeholder="请在此输入您的问题" />
<input type="button" class="pure-button pure-button-primary" onclick="getAntwort()"
value="询问" />
<input type="button" class="pure-button" onclick="clearAll()" value="清除" />
</fieldset>
</form>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1">
<h2>参考答案</h2>
<div id="antwort">(请先提问)</div>
</div>
</div>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
function getAntwort() {
document.getElementById("antwort").innerHTML = "请稍候……";
var frage = document.getElementById("frage").value;
$.get("https://eleutheria.tech/hitokoto/?data=antwort", function (data) {
document.getElementById("antwort").innerHTML = data;
});
}
function clearAll() {
document.getElementById("antwort").innerHTML = "(请先提问)";
document.getElementById("frage").value = "";
}
</script>
</body>
</html>