google ajax feed API 应用——新闻聚合

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  5.         <title>刘鑫的主页:->小懒猪</title>
  6.     </head>
  7.     <body>
  8. <!-- ++Begin Dynamic Feed Wizard Generated Code++ -->
  9.   <!--
  10.   // The Following div element will end up holding the actual feed control.
  11.   // You can place this anywhere on your page.
  12.   -->
  13.   <div id="feed-control">
  14.     <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>
  15.   </div>
  16.   <!-- Google Ajax Api
  17.   -->
  18.   <script src="http://www.google.com/jsapi?key=ABQIAAAA_0SuWBgH25xjyJkU3GhZcBTjBXNpUFgAw6sv9zC6sp5c-jqDIBRFtQlJluSjJZJXYA7z1SvDGrXPMQ"
  19.     type="text/javascript"></script>
  20.   <!-- Dynamic Feed Control and Stylesheet -->
  21.   <script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js"
  22.     type="text/javascript"></script>
  23.   <style type="text/css">
  24.     @import url("http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css");
  25.   </style>
  26.   <script type="text/javascript">
  27.     function LoadDynamicFeedControl() {
  28.       var feeds = [
  29.                     {title: '优酷推荐',
  30.                      url: 'http://www.youku.com/index/rss_cool_v/'
  31.                     },
  32.                     {title: '优酷浏览最多',
  33.                      url: 'http://www.youku.com/index/rss_hot_day_videos/duration/1'
  34.                     },
  35.                     {title: 'python',
  36.                      url: 'http://news.google.com/news?amp;ie=ISO-8859-1&hl=zh-CN&q=python&ie=UTF-8&nolr=1&output=rss'
  37.                     },
  38.                     {title: 'flex',
  39.                      url: 'http://news.google.com/news?amp;ie=ISO-8859-1&hl=zh-CN&q=flex&ie=UTF-8&nolr=1&output=rss'
  40.                     },
  41.                     {title: 'sqlite',
  42.                      url: 'http://news.google.com/news?amp;ie=ISO-8859-1&hl=zh-CN&q=sqlite&ie=UTF-8&nolr=1&output=rss'
  43.                     },
  44.                     {title: 'PHP',
  45.                      url: 'http://news.google.com/news?amp;ie=ISO-8859-1&hl=zh-CN&q=PHP&ie=UTF-8&nolr=1&output=rss'
  46.                     },
  47.                     {title: 'Javascript',
  48.                      url: 'http://news.google.com/news?amp;ie=ISO-8859-1&hl=zh-CN&q=Javascript&ie=UTF-8&nolr=1&output=rss'
  49.                     },
  50.                     {title: 'C++',
  51.                      url: 'http://news.google.com/news?amp;ie=ISO-8859-1&hl=zh-CN&q=C%2B%2B&ie=UTF-8&nolr=1&output=rss'
  52.                     },
  53.                     {title: '爱情',
  54.                      url: 'http://news.google.com/news?amp;ie=ISO-8859-1&hl=zh-CN&q=爱情&ie=UTF-8&nolr=1&output=rss'
  55.                     },
  56.                     {title: '金融',
  57.                      url: 'http://news.google.com/news?amp;ie=ISO-8859-1&hl=zh-CN&q=金融&ie=UTF-8&nolr=1&output=rss'
  58.                     },
  59.                     {title: '经济',
  60.                      url: 'http://news.google.com/news?amp;ie=ISO-8859-1&hl=zh-CN&q=经济&ie=UTF-8&nolr=1&output=rss'
  61.                     }
  62.      ];
  63.       var options = {
  64.         numResults : 20,
  65.         stacked : true,
  66.         horizontal : false,
  67.         title : "我关注的领域",
  68.         linkTarget : google.feeds.LINK_TARGET_BLANK
  69.       }
  70.       new GFdynamicFeedControl(feeds, 'feed-control', options);
  71.     }
  72.     // Load the feeds API and set the onload callback.
  73.     google.load('feeds''1');
  74.     google.setOnLoadCallback(LoadDynamicFeedControl);
  75.   </script>
  76. <!-- ++End Dynamic Feed Control Wizard Generated Code++ -->
  77.     </body>
  78. </html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值