jQuery分析RSS文档
<script type="text/javascript" src="./js/jquery/jquery.js"></script> <script type="text/javascript" src="./js/jFeed/build/dist/jquery.jfeed.pack.js"></script> <script type="text/javascript"> function loadFeed(){ $.getFeed({ url: 'proxy.php?url=http://locationofrssfeed/', success: function(feed) { //Title $('#result').append('<h2><a href="' + feed.link + '">' + feed.title + '</a>' + '</h2>'); //Unordered List var html = '<ul>'; $(feed.items).each(function(){ var $item = $(this); //trace( $item.attr("link") ); html += '<li>' + '<h3><a href ="' + $item.attr("link") + '" target="_new">' + $item.attr("title") + '</a></h3> ' + '<p>' + $item.attr("description") + '</p>' + // '<p>' + $item.attr("c:date") + '</p>' + '</li>'; }); html += '</ul>'; $('#result').append(html); } }); } </script>