我想这个该是最简单的了local.html:<xml id="SendData"></xml><script language="javascript">SendData.XMLDocument.LoadXml("<Hello>Hello!!!!</Hello>");var strURL ="service.asmx/test"
var oXMLHTTP = new ActiveXObject( "MSXML2.XMLHTTP" );
oXMLHTTP.open( 'POST', strURL , false ) ;
oXMLHTTP.send( SendData );
alert( oXMLHTTP.responseXML.xml );</script>service.asmx:
[WebMethod]
public XmlDocument test()
{
XmlDocument xReturnValue = new XmlDocument();
xReturnValue.Load( Context.Request.InputStream );
return xReturnValue;
}
var oXMLHTTP = new ActiveXObject( "MSXML2.XMLHTTP" );
oXMLHTTP.open( 'POST', strURL , false ) ;
oXMLHTTP.send( SendData );
alert( oXMLHTTP.responseXML.xml );</script>service.asmx:
[WebMethod]
public XmlDocument test()
{
XmlDocument xReturnValue = new XmlDocument();
xReturnValue.Load( Context.Request.InputStream );
return xReturnValue;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货