html静态页面可以通过ajax访问远端webservice吗
在静态页面上用jquery ajax调用远程webservice接口,结果访问的时候都错误弹出1 提示 500 Internal Server Error
代码如下
$(function () {
$.ajax({
type: "post",
contentType: "application/json",
url: "http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx/getSupportCityString",
data: "{theRegionCode:'31127' }",
dataType: "json",
cache: false,
success: function (result) {
//$("#strCount").html(result.d);
alert(2);
},
error: function (e) {
//$("#strCoun").html(e.toString());
alert(1);
}
});
})
这个 如何解决?
代码如下
$(function () {
$.ajax({
type: "post",
contentType: "application/json",
url: "http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx/getSupportCityString",
data: "{theRegionCode:'31127' }",
dataType: "json",
cache: false,
success: function (result) {
//$("#strCount").html(result.d);
alert(2);
},
error: function (e) {
//$("#strCoun").html(e.toString());
alert(1);
}
});
})
这个 如何解决?
...全文
相关推荐
WebService和Ajax总结
WebService\Ajax的总结,全方面介绍了.net下的webservice和ajax原理以及扩展空间。
使用AJAX返回WebService里的集合具体实现
代码如下: ——————-WebService1 —————————– // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。 [System.Web.Script.Services.ScriptService] public class WebService1 : System.Web.Services.WebService { [WebMethod] public List<string> GetList() { List<string> list = new List<string>(); list.Add(“王一”); list.Add(“22
jQuery使用Ajax方法调用WebService.doc
jQuery使用Ajax方法调用WebService.doc
基于HTML5_Ajax和WebService的WebGIS研究_徐卓揆
基于HTML5_Ajax和WebService的WebGIS研究_徐卓揆 论文
Ajax请求WebService跨域问题的解决方案
主要介绍了Ajax请求WebService跨域问题的解决方案,本文给大家介绍的非常详细,具有参考借鉴价值,需要的朋友可以参考下


