I wanna fech an json file (Steam Api) and want to show the file orderd in a table. I have tried it with a button and a list but i doesn't work. And i dont know how to do this with a table. (Example:http://ift.tt/1znlqJX)
<html>
<head>
<title>JSON</title>
</head>
<script src="http://ift.tt/13qgtmt"></script>
<script type="text/javascript">
$("button").click( function() {
$.getJSON( "json_data.json", function(obj) {
$.each(obj, function(key, value) {
$("ul").append("<li>"+value.name+"</li>");
});
});
});;
</script>
<body>
<ul></ul>
<button>Refresh</button>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire