-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
61 lines (43 loc) · 2.22 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>新闻言论自动提取</title>
<link type="text/css" href="/static/css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="./static/css/bootstrap-theme.css">
<script src="./static/js/jquery.js"></script>
<script src="./static/js/bootstrap.js"></script>
<script>
function myfunction(){
var str = '{{name}}';
var a = str.replace(/"/g,"\"");
var data = JSON.parse(a);
head = '<table class="table"><caption>新闻言论提取</caption><thead> \
<tr><th>人名/机构名</th><th>动作</th><th>内容</th> </tr> </thead>'
content = '<tbody>'
for(var key in data){
var length_list = data[key];
content = content + '<tr>' + '<td>' + length_list[0] + '</td>' + '<td>' + length_list[1] + '</td>' + '<td>' + length_list[2] + '</td>' + '</tr>' ;
}
content = content + '</tbody>' + '</table>'
content = head + content
return content
}
</script>
</head>
<body>
<!--<script>document.write("<p1>hello {{name}}</p1>")</script>-->
<div style="padding: 50px 50px 50px;">
<form class="bs-example bs-example-form" role="form" method="post">
<div class="input-group">
<span class="input-group-addon">news</span>
<input type="text" class="form-control" name="string" placeholder="新闻文本内容" />
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
<script>document.write(myfunction())</script>
<div id="footer" style="background-color:#FFA500;clear:both;text-align:center;">
版权 © github.com/mosbest</div>
</body>
</html>