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);
}
});
})
这个 如何解决?