-
Notifications
You must be signed in to change notification settings - Fork 0
/
MembacaFileJson1.html
143 lines (134 loc) · 5.24 KB
/
MembacaFileJson1.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Membaca File Json</json>
</title>
<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="css/animate.css">
<link type="text/css" rel="stylesheet" href="css/linearicon.min.css">
<link type="text/css" rel="stylesheet" href="css/styles.css">
<link rel="icon" href="img/Logo Respect3.png">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
</head>
<body>
<!-- Start: Navbar -->
<nav id="navbar-levidio-branding" class="navbar navbar-expand-md fixed-top navbar-cv animated-nav">
<div class="container">
<a class="navbar-brand" href="https://drive.google.com/drive/folders/1iGVE0QN4mY3X0pXeyd4oUYo4VIhBkOVh"
target="self">
Respect (CLICK HERE!)
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#levidio-branding-menu"
aria-controls="levidio-branding-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="levidio-branding-menu">
<ul class="nav nav-pills navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" target="self"
href="https://respect-1a.github.io/zharmedia.github.io/Chart.html">
Chart
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="self"
href="https://respect-1a.github.io/zharmedia.github.io/MembacaFileJson.html">
Data Scraping II
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="self"
href="https://respect-1a.github.io/zharmedia.github.io/MembacaFileJson1.html">
Data Scraping
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="self" href="https://respect-1a.github.io/zharmedia.github.io/">
M Azhar
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="self" href="https://respect-1a.github.io/zharmedia.github.io/">
Rifatia
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="self" href="https://respect-1a.github.io/zharmedia.github.io/">
Syelvie
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="self" href="https://respect-1a.github.io/zharmedia.github.io/">
Hasanah
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="self" href="https://respect-1a.github.io/zharmedia.github.io/">
Ryrie
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- End: Navbar -->
<script type="text/javascript">
$(function () {
//mengambil data dari file headline.txt
$.get("Json/headline.json", function (obj) {
var str = "<table class='table'><thead class='thead-dark'><tr><th scope='col'>No</th><th scope='col'>Judul Headline</th><th scope='col'>Kategori</th><th scope='col'>Waktu Publish</th><th scope='col'>Waktu Scraping</th></tr></thead ><tbody>";
//looping data headline
$.each(obj, function (n, data) {
//isi tabel
str += "<tr><td>" + (n + 1) + "</td>";
str += "<td>" + data.judul + "</td>";
str += "<td>" + data.kategori + "</td>";
str += "<td>" + data.waktupublish + "</td>";
str += "<td>" + data.waktuscrapping + "</td></tr>";
});
//tag tabel penutup
str += "</tbody></table>";
//Display semua headline ke html
$("#headline_json").html(str);
});
});
</script>
<br><br><br>
<h1 class="font-2 font-extrabold text-dark name"> Headline Republike Online </h1>
<div id="headline_json"></div>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<!-- Start: Footer -->
<footer>
<div class="container">
<div class="row">
<div class="xxs-clear-left col-md-10 offset-md-1 offset-sm-2 offset-1">
<div class="row">
<div class="col-sm-6 col-6">
Made with love by Respect Team
</div>
<div class="col-sm-6 col-6 text-right xxs-center">
Copyright 2021 - All Rights Reserved
</div>
</div>
</div>
</div>
</div>
</footer>
<!-- End: Footer -->
<!-- Javascript -->
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/wow.min.js"></script>
<script type="text/javascript" src="js/settings.js">
</script>
</body>
</html>