10
rated 0 times
[
12]
[
2]
/ answers: 1 / hits: 8234
/ 8 Years ago, sat, june 11, 2016, 12:00:00
<html>
<body>
<div id=output>hi</div>
</body>
<script>
var link=http://mywp.com/cilacap/api/get_posts/;
var jcontent= JSON.parse(link);
var output=document.getElementById('output');
output.innerHTML=jcontent.id' ';
</script>
</html>
It only shows hi.
Can someone tell me how to show JSON items such as id and postDate
with looping but without PHP scripting?
Thanks
More From » html