谢谢大家 请大家帮忙看一下关于XMLHTTP的问题~在线等!!!
<script language= "javascript ">
xmlhttp = new ActiveXObject( "Msxml2.XMLHTTP ");
function fnDo(ID,dID)
{
var xmlDom = new ActiveXObject( "Msxml2.DOMDocument ");
var strURL = "print2.asp?ID= " + ID;
xmlhttp.Open( "POST ",strURL , true);
xmlhttp.onreadystatechange=fnRun(dID);
xmlhttp.Send(xmlDom);
div_chuli_1.innerHTML = " <img src=\ "img/class_ar.gif\ "> 处理中请稍候... "
}
function fnRun(sID)
{
var state = xmlhttp.readyState;
var xmlDom = new ActiveXObject( "Msxml2.DOMDocument ");
if (state == 4)
{
xmlDom.loadXML(xmlhttp.responseXML.xml);
//alert(xmlDom.documentElement.selectSingleNode( "//objXML ").text)
var getInfo = xmlDom.documentElement.selectSingleNode( "//objXML ").text;
sID.innerHTML = getInfo
}
}
</script>
我不知道为什么fnRun(sID)中的sID怎么传进去,大家帮帮忙吧,我在线等的
------解决方案--------------------xmlhttp.onreadystatechange = function()
{
return fnRun(dID);
}