📄 news_comment.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 + -