xmlhttp不能直接post去webservice吗?
var xmlhttp = new ActiveXObject( "Msxml2.XMLHTTP ");
function GetSettlementInfo()
{
xmlhttp = new ActiveXObject( "Msxml2.XMLHTTP ");
xmlhttp.onreadystatechange=ShowReceive;
xmlhttp.open( "POST ", "http://10.243.161.147:8088/cisws/SettlementSvc.asmx/GetReceivedInvoices ",true);
xmlhttp.setRequestHeader( "CONTENT-TYPE ", "application/x-www-form-urlencoded ");
xmlhttp.send( "company= " + document.all[ "boxwpco "].value);
}
function ShowReceive()
{
if(xmlhttp.readyState==4)
{
alert(xmlhttp.responseText);
divinfo.innerHTML = " ";
var objNode = xmlhttp.responseXML.documentElement.selectNodes( "/DataSet/diffgr:diffgram/NewDataSet/Table ");
var rs= " <span> 已收发票记录 </span> <hr> <table border=\ "1\ "cellpadding=\ "0\ " cellspacing==\ "0\ " style=\ " border-collapse: \ "> <tr style=\ "collapse; background-color=#D6E8FF\ "> <th> 处理帐期 </th> <th> 公司名称 </th> <th> 发票月份 </th> <th> 业务类型 </th> </tr> ";
for(i=0;i <objNode.length;i++)
{
rs += " <tr> <td> " + objNode.item(i).selectSingleNode( "DealPeriod ").text + " </td> ";
rs += " <td> " + objNode.item(i).selectSingleNode( "company ").text + " </td> ";
rs += " <td> " + objNode.item(i).selectSingleNode( "billperiod ").text + " </td> ";
rs += " <td> " + objNode.item(i).selectSingleNode( "business ").text + " </td> </tr> ";
}
divresult.innerHTML = rs + " </table> ";
}
else
{
divinfo.innerHTML = "正在处理... ";
}
}
以上这段代码在本机调用就没有问题,但在其他机器上调出就出错
[解决办法]
你在其他机器上直接访问这个asmx 看看?
[解决办法]
好像高手问的问题只能更高的人回答了。热闹来一下。
[解决办法]
关注下~
[解决办法]
关注下
[解决办法]
谢谢楼主分享~