<html>
<head>
<title>Google Feed API Sample</title>
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAasAJryKxWJnBFVJa487d9hTHGAxTVT7IRADYa-JdYz7xQ8IQZBSthgDZdggYpQHsmm6WYtHstQFfLA"></script>
<script type="text/javascript"><!--
function initialize() {
var feed = new google.feeds.Feed("http://jsgt.org/mt/01/atom.xml");
feed.load(function(result) {
if (!result.error) {
var container = document.getElementById("feed");
var entry = result.feed.entries[0];
var eTitle = entry.title;
var eCont = entry.content;
container.innerHTML += "<h3>"+eTitle+"</h3>";
container.innerHTML += eCont+"<hr>";
}
});
}
google.load("feeds", "1");
google.setOnLoadCallback(initialize);
// --></script>
</head>
<body>
<h1>Google Feed API Sample (3)</h1>
<h2>JavaScript++かも日記</h2>
<div id="feed"></div>
</body>
</html>
<html>
<head>
<title>Google Feed API Sample</title>
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAasAJryKxWJnBFVJa487d9hTHGAxTVT7IRADYa-JdYz7xQ8IQZBSthgDZdggYpQHsmm6WYtHstQFfLA"></script>
<script type="text/javascript"><!--
function initialize() {
var feed = new google.feeds.Feed("http://jsgt.org/mt/01/atom.xml");
feed.load(function(result) {
if (!result.error) {
var container = document.getElementById("feed");
for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
var eTitle = entry.title;
var eCont = entry.content;
container.innerHTML += "<h3>"+eTitle+"</h3>";
container.innerHTML += eCont+"<hr>";
}
}
});
}
google.load("feeds", "1");
google.setOnLoadCallback(initialize);
// --></script>
</head>
<body>
<h1>Google Feed API Sample (4)</h1>
<h2>JavaScript++かも日記</h2>
<div id="feed"></div>
</body>
</html>