要访问webservice和访问aspnet有什么不同啊
比如有个[webmethod]
public int add(int a,int b)
{
return a+b;
}
这个web服务的网址是http://localhost/Webservice.asmx
怎么通过xmlhttp访问这web add方法
xmlhttp.open("get","http://localhost/Webservice.asmx/add?a=5&b=6",false);
alert(xmlhttp.responseText);
是不是这样?
请给个简单例子行吗
非常谢谢
比如有个[webmethod]
public int add(int a,int b)
{
return a+b;
}
这个web服务的网址是http://localhost/Webservice.asmx
怎么通过xmlhttp访问这web add方法
xmlhttp.open("get","http://localhost/Webservice.asmx/add?a=5&b=6",false);
alert(xmlhttp.responseText);
是不是这样?
请给个简单例子行吗
非常谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货