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> ";
}