You can goto RSS to javascript homepage then create your own javascript. It's totally free. All you need is just paste the feed url then generate javascript after you set your own setting there. Easy to use and faster than JSON because it not create a big file like JSON does.... :D
Anyway, if you more prefer JSON than RSS to javasript, here is RSS fetch in JSON version:
<script type="text/javascript">
function recentpostslist(json) {
document.write('<ul>');
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') {
break;
}
}
var entryUrl = "'" + json.feed.entry[i].link[j].href + "'";//bs
var entryTitle = json.feed.entry[i].title.$t;
var item = "<li>" + "<a href="+ entryUrl + '" target="_blank">' + entryTitle + "</a>";
document.write(item);
}
document.write('</li>');
}
document.write('</ul>');
</script>
<script src="http://fun-tutorial.blogspot.com/feeds/posts/default?max-results=10&alt=json-in-script&callback=recentpostslist"></script>
Change the feed address as you want.
Very simple right? :D
Post a Comment