-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
68 lines (62 loc) · 1.88 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/chart.css" media="screen" type="text/css" />
<title>PV图表</title>
<script type="text/javascript" src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript" src="http://apps.bdimg.com/libs/d3/3.4.8/d3.js"></script>
<script type="text/javascript" src="js/diagrams.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#post_button").click(function() {
$.ajax({
type: "POST",
url: "http://45.78.5.243:10080/post",
data: $("#query_form").serialize(),
datatype: "json",
beforeSend: function() {},
success: function() {
alert($("#query_form").serialize())
draw_pv_diagram("http://45.78.5.243:10080/")
},
complete: function() {},
error: function() {}
});
});
});
</script>
</head>
<pre>
/\___/\
( o o )
/ * \
\__\_/__/ meow!
/ \
/ ___ \
\/___\/
</pre>
<body>
<div>
<form id="query_form">
<select name="query_type">
<option value="pv">pv</option>
<option value="uv">uv</option>
</select>
<p>
日期:
<input type="date" name="date" />
</p>
<p>
酒店:
<input type="text" name="hotel" />
</p>
<p>
电视型号:
<input type="text" name="TV_type" />
</p>
<input type="button" id="post_button" value="提交" />
</form>
</div>
</body>
</html>