forked from MikailaAkeredolu/networkde
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsampleform.html
More file actions
49 lines (34 loc) · 1.42 KB
/
sampleform.html
File metadata and controls
49 lines (34 loc) · 1.42 KB
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
<html>
<head>
<title>The jQuery Example</title>
<script type = "text/javascript"
src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type = "text/javascript" language = "javascript">
$(document).ready(function() {
$("#driver").click(function(event){
$.getJSON('opendata.json', function(jd) {
//console.log(jd.data);
var items = [];
$.each(jd.data[0], function(key, val){
items.push('<li id="' + key + '">' + val + '</li>');
});
$('<ul/>', {
'class':'interest-list',
html:items.join('')
}).appendTo('body');
// $('#stage').html('<p> Name: ' + jd.data[0][8] + '</p>');
// $('#stage').append('<p>Age : ' + jd.age+ '</p>');
// $('#stage').append('<p> Sex: ' + jd.sex+ '</p>');
});
});
});
</script>
</head>
<body>
<p>Click on the button to load result.html file:</p>
<div id = "stage" style = "background-color:#cc0;">
STAGE
</div>
<input type = "button" id = "driver" value = "Load Data" />
</body>
</html>