访问博客帖子链接名单上有简单的Blogger JSON提要如何与下一个先前
<script type='text/javascript'>
function mycallback(json) {
for (var i = 0; i < json.feed.entry.length; i++) {
for (var j = 0; j < json.feed.entry[i].link.length; j++) {
if (json.feed.entry[i].link[j].rel == 'alternate') {
var postUrl = json.feed.entry[i].link[j].href;
break;
}
}
var postTitle = json.feed.entry[i].title.$t;
var item = '<ul><li><a href=' + postUrl + '>' + postTitle + '</a></li></ul>';
document.write(item);
}
}
</script>
<button type="button">Prev</button>
<button type="button">Next</button>
<h2>Recent Post</h2>
<script src='https://techtovillage.blogspot.com/feeds/posts/default?orderby=published&max-results=1000&alt=json-in-script&callback=mycallback'></script>
此代码显示我的总帖子链接列表。 如何将所有帖子链接分成5个链接列表,并访问所有帖子链接与下一个prev按钮