<Script language="JavaScript">
var bloglist=new Array();
var xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
function startload(){
xmlHttp.open("GET","http://www.blogjava.net/zbw25/Rss.aspx",true);
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4&&xmlHttp.status==200){
var xmldom=xmlHttp.responseXML;
var channel=xmldom.documentElement.childNodes.item(0);
var itemlist=channel.childNodes;
for(var i=0;i<itemlist.length;i++){
var node=itemlist.item(i);
if(node.tagName=="title"){
blogtitle.innerHTML=node.text;
}
if(node.tagName=="link"){
bloglink.href=node.text;
}
if(node.tagName=="description"){
blogdescription.innerHTML=node.text;
}
if(node.tagName=="item"){
bloglist[bloglist.length]=node.childNodes;
}
}
showitem(bloglist[0]);
}
}
xmlHttp.send(null);
}
function showitem(itemlist){
for(var i=0;i<itemlist.length;i++){
var node=itemlist.item(i);
if(node.tagName=="title"){
itemtitle.innerHTML=node.text;
}
if(node.tagName=="link"){
itemlink.href=node.text;
}
if(node.tagName=="description"){
description.innerHTML=node.text;
}
if(node.tagName=="author"){
author.innerHTML=node.text;
}
if(node.tagName=="pubDate"){
pubDate.innerHTML=node.text;
}
}
}
</Script>
<body onload="startload()">
<font color=blue><a id="bloglink" href="#"><div id="blogtitle"></div></a></font>
<br>
By <font color=blue><div id="managingEditor"></div></font><br>
<font color=blue><div id="blogdescription"></div></font><br>
<br>
<font color=#000066><a id="itemlink" href="#"><div id="itemtitle"></div></a></font><br>
<font color=#000066><a id="itemlink" href="#"><div id="itemtitle"></div></a></font><br>
By <font color=blue><div id="author"></div></font><br>
<div id="description"></div><br>
<div id="pubDate" align="right"></div>
</body>
posted on 2006-06-28 11:59
梦源 阅读(157)
评论(0) 编辑 收藏