Skip to content

Instantly share code, notes, and snippets.

@mkhuda
Last active December 16, 2015 18:20
Show Gist options
  • Save mkhuda/5476794 to your computer and use it in GitHub Desktop.
Save mkhuda/5476794 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>List Cewek</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$.ajax({
url: 'http://namadomain-anda.com/parsing.php',
dataType: 'jsonp',
jsonp: 'jsoncallback',
timeout: 5000,
success: function(data, status){
$.each(data, function(i,item){
$("#listcewek").append("<li>"+item.namaceweknya+"</li>");
});
$("#listcewek");
},
error: function(){
alert('Error terjadi');
}
});
});
</script>
</head>
<body>
<h3>Parsing JSON dengan Jquery</h3>
<div id="kontencewek">
<ul id="listcewek">
</ul>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment