<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN"
Http://www.w3.org/TR/html4/loose.dtd>
<Html>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> obtain the RSS data source using Javascript </title>
<Script chartset = "UTF-8">
Function list ()
{
Var xmlDoc = new ActiveXObject ("Microsoft. XMLDOM ");
XmlDoc. async = "false ";
XmlDoc. load ("http://special.allnet.cn/allnetevents/2006/rss.aspx"); // URL of the RSS source
Var nodes = null;
A2 = "webLog ";
Nodes = xmlDoc. selectNodes ("/rss/channel/item ");
If (nodes = null)
Allnet2006.innerText = "no data found ";
Else
{
Allnet2006.innerHTML = "";
Xx = nodes. length;
If (xx> 6) // control the list Length
Xx = 6; // control the list Length
For (I = 0; I <xx; I ++ ){
Allnet2006.innerHTML + = "<li> <a href = '" + nodes [I]. selectSingleNode ("link "). text + "'rel = 'external '>" + nodes [I]. selectSingleNode ("title "). text + "</a> </li> ";
}
}
}
</Script>
</Head>
<Body onLoad = "list ()">
<Div id = "allnet2006"> </div>
</Body>
</Html>