function InitXMLHTTP(){//初始化、指定处理函数、发送请求的函数
var oXMLDoc;
//开始初始化XMLHttpRequest对象
if(window.XMLHttpRequest) { //Mozilla 浏览器
oXMLDoc = new XMLHttpRequest();
if (oXMLDoc.overrideMimeType) {//设置MiME类别
oXMLDoc.overrideMimeType("text/xml");
}
}
else if(window.ActiveXObject) { // IE浏览器
try{
oXMLDoc = new ActiveXObject("Msxml2.XMLHTTP");
}catch (e){
try{
oXMLDoc = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!oXMLDoc) { // 异常,创建对象实例失败
window.alert("不能创建XMLHttpRequest对象实例.");
oXMLDoc = null;
}
return oXMLDoc;
}
function DispLink(_obj,_i,_Id)
{
for(var i=0;i<topicCount;i++){
document.getElementById("DivDispAnswer"+i).style.display = "none";
}
var oXMLDoc = InitXMLHTTP();
if(oXMLDoc)
{
sURL = "GetExpXML.asp?ItemId=" + _Id;
oXMLDoc.open("POST",sURL,false);
oXMLDoc.setRequestHeader("Content-Type", "text/xml");
oXMLDoc.setRequestHeader("charset", "utf-8");
oXMLDoc.send();
var strResult = unescape(oXMLDoc.responseText);
document.getElementById("DivDispAnswer"+_i).innerHTML = strResult;
document.getElementById("DivDispAnswer"+_i).style.display = "block";
if(document.getElementById("FS"+_i))
document.getElementById("FS"+_i).focus();
//_obj.innerHTML = "隐藏答案";
}
}