⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 show.js

📁 ajax快速入门,主要讲解原理与部门实现
💻 JS
字号:
function waitForShow(){
	var allLoadComplate=true;
	for(var i=0;i<blogList.length;i++){
		if(blogList[i].state=="free"){
			addLoadRSSTask(i,blogList[i].xmllink,"update");
			blogList[i].state="loading";
		}
		if(blogList[i].state!="complate"){
			allLoadComplate=false;
		}
	}
	showBlogList();
	if(allLoadComplate!=true) setTimeout("waitForShow()",2000);
}

function showBlogList(){
	count.innerHTML=blogList.length+" Feeds";
	showBlogItemList();
}

function showBlogItemList(){
	var showhtml="";
	if(blogList.length>0){
		showhtml="<table border=\"0\" width=\"260\">";
		for(var i=0;i<blogList.length;i++){
			showhtml=showhtml+"<tr>";
			showhtml=showhtml+"<td width=\"20\">&nbsp;</td>";
			if(blogList[i].state=="complate"){
				showhtml=showhtml+"<td width=\"24\"><img src=\"blog.gif\"></td>";
			} else {
				showhtml=showhtml+"<td width=\"24\"><img src=\"wait.gif\"></td>";
			}
			showhtml=showhtml+"<td><a href=\"#\" onclick=\"showBlogItem('"+i+"');\"><font size=\"2px\" color=\"#000000\" face=\"Verdana\">";
			if(blogList[i].newitem==0||blogList[i].newitem==undefined){
				showhtml=showhtml+blogList[i].blogtitle;
			} else {
				showhtml=showhtml+"<b>"+blogList[i].blogtitle+"("+blogList[i].newitem+")</b>";
			}
			showhtml=showhtml+"</font></a></td>";
			showhtml=showhtml+"</tr>";
		}
		showhtml=showhtml+"</table>";
	}
	itemlist.innerHTML=showhtml;
}

function showAllBlogItem(){
}

function showBlogItem(id){
	currentBlog=blogList[id];
	currentBlog.lastDateTime=currentBlog.tempLastTime;
	updateOPML(id,currentBlog);
	top.baseframe.location="step8-base.html#top";
	top.baseframe.showBlog(currentBlog.newitem);
	currentBlog.newitem=0;
	showBlogItemList();
}

function showBlog(newitem){
	main.style.display="";
	var blog=top.treeframe.currentBlog;
	blog_title.innerHTML=blog.blogtitle;
	blogurl.href=blog.bloglink;
	blog_description.innerHTML=blog.blogdescription;
	ID=blog.ID;
	if(blog.image!=null){
		image.innerHTML="<a href=\""+getNodeString(blog.image,"link")+"\"><image src=\""+getNodeString(blog.image,"url")+"\" alt=\""+getNodeString(blog.image,"title")+"\" border=\"0\"></a>";
	} else {
		image.innerHTML="";
	}
	Count_PubDate.innerHTML=blog.blogitemlist.length+" Items|Updated: "+blog.pubDate;
	showItemList(blog.blogitemlist,newitem);
}

function showItemList(itemlist,newitem){
	var showhtml="";
	showhtml="<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
	for(var i=0;i<itemlist.length&&i<newitem;i++){
		var item=itemlist[i];
		showhtml=showhtml+"<tr>";
		showhtml=showhtml+"	<td><a href=\""+getNodeString(item,"link")+"\" target=\"_blank\"><font color=\"#1393c0\" size=\"4pt\">"+getNodeString(item,"title")+"</font></a></td>";
		showhtml=showhtml+"</tr>";
		showhtml=showhtml+"<tr>";
		showhtml=showhtml+"	<td><font size=\"2pt\">By "+getNodeString(item,"author")+"</font></td>";
		showhtml=showhtml+"</tr>";
		showhtml=showhtml+"<tr>";
		showhtml=showhtml+"	<td><font size=\"2pt\">"+getNodeString(item,"description")+"</font></td>";
		showhtml=showhtml+"</tr>";
		showhtml=showhtml+"<tr>";
		showhtml=showhtml+"	<td background=\"line3.jpg\"></td>";
		showhtml=showhtml+"</tr>";
		showhtml=showhtml+"<tr>";
		showhtml=showhtml+"	<td><font size=\"2pt\">Posted on: "+getNodeString(item,"pubDate")+"</font></td>";
		showhtml=showhtml+"</tr>";
		showhtml=showhtml+"<tr>";
		showhtml=showhtml+"	<td background=\"line4.jpg\" height=\"2\"></td>";
		showhtml=showhtml+"</tr>";
	}
	showhtml=showhtml+"</table>";
	bloglist.innerHTML=showhtml;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -