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

📄 news_comment.js

📁 最全的介绍C语言结构体的使用方法和使用技巧!
💻 JS
字号:
/**
 * Ajax ????JavaScript
 */
function getCommentHtmlList(sid)
{
	var strText;
	var fError = false;
	if (xmlhttp.readyState == 4)
	{
		if (xmlhttp.status == 200)
		{
			
			strText = fetchXmlValue(xmlhttp.responseXML, 'body');
			//alert("??????     " + strText);
			if (null == strText) 
			{
				fError = true;
			}
			else 
			{
				fetchObject("commentsec" + sid ).innerHTML = strText;
			}
		}
		
		else
		{
			fError = true;
		}
	}
	
	if (fError) 
	{
		fetchObject("commentsec" + sid ).innerHTML = "";			
		fetchObject("comment" + sid ).style.display = "none";
	} 
	else 
	{
		//fetchObject("comment" + sid).scrollIntoView(true);
	}
}


function OpenSection(sid, pages)
{
	
	var sectionTitleObj = fetchObject("comment" + sid);
	
	if (pages >= 0)
	{
	}
	else
	{
		if (sectionTitleObj.style.display == "block")
		{
			Close(sid, pages);
			return ;
		}
	}
	
	if (sectionTitleObj.style.display == 'none' || sectionTitleObj.style.display == '') 
	{
		sectionTitleObj.style.display = "block";
	}
	
	if (pages >= 0) 
	{
		var strA = "soft_id="+ sid;
	  strA += "&pages=" +pages;

	  StartGETRequest('/servlet/cn.com.softhouse.news.controller.RequestNewsComment?'+strA, function() {getCommentHtmlList(sid)});
	} 
	else 
	{
		if(fetchObject("commentsec" + sid ).innerHTML == "") 
		{
			var strA = "soft_id="+ sid;

	    //alert("HHHHHHHH"+strA);
	    StartGETRequest('/servlet/cn.com.softhouse.news.controller.RequestNewsComment?'+strA, function() {getCommentHtmlList(sid)});
		} 
	}
}

function Close(sid,  pages)
{
	
	fetchObject("comment" + sid ).style.display = "none";
	
	if (pages > 0) 
	{
	  fetchObject("commentsec" + sid).innerHTML = "";
	}
}

function CloseComment(sid)
{
	//alert("????????????");
	if (fetchObject("Err"+ sid) != null) {
		fetchObject("Err"+sid).innerHTML = "";
		fetchObject("txtComment"+sid).value = "";
	}
	Close(sid);
}





⌨️ 快捷键说明

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