无刷新取数据的一个例子
发表于:2007-06-30来源:作者:点击数:
标签:
function getResultValue() { var oXmlHttp = new ActiveXObject(Microsoft.XMLHTTP); oXmlHttp.Open(POST, ProcessReport.aspx, false); oXmlHttp.send(+dateFrom++type++dateTo+); //window.alert(oXmlHttp.ResponseText); if (oXmlHttp.ResponseText!=) {
function getResultValue() { var oXmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); oXmlHttp.Open("POST", "ProcessReport.aspx", false); oXmlHttp.send(""+dateFrom+""+type+""+dateTo+""); //window.alert(oXmlHttp.ResponseText); if (oXmlHttp.ResponseText!="") { window.document.all.pResult.style.display=""; window.document.all.pResult.innerHTML=oXmlHttp.ResponseText; window.document.all.DivWait.style.display="none"; document.all.btnLogin.style.display=@#@#; window.document.all.divPrint.style.display=@#@#; //window.document.all.btnExport.style.display=""; return; } setTimeout("getResultValue()",1000); }
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(Request.InputStream);
type=xmldoc.SelectSingleNode("//type").InnerText ;
if (type=="close")
{
return;
}
dateFrom=xmldoc.SelectSingleNode("//dateFrom").InnerText ;
dateTo =xmldoc.SelectSingleNode("//dateTo").InnerText ;
原文转自:http://www.ltesting.net