参考下面的代码
var objHTTP = new ActiveXObject("MSXML2.XMLHTTP");
var xmlDOC = new ActiveXObject("MSXML.DOMDocument");
var strWebserviceURL = "http://localhost/testss/Service1.asmx/HelloWorld";
var strRequest = "name=111";
objHTTP.Open( "POST", strWebserviceURL, false);
objHTTP.SetRequestHeader( "Content-Type", "application/x-www-form-urlencoded");
objHTTP.Send(strRequest);
var bOK = xmlDOC.load(objHTTP.responseXML);
if(objHTTP.Status==200)
{
xmlDOC.save("c:\\aaa.xml");
}
不过,象这样的方法,在ASP,VB中也一样是可用的。
文章来源:http://ms.mblogger.cn/xuzhong/posts/16578.aspx