|
如题,
我用action 访问我本地 另一个端口的服务器(spring 框架)的action,返回一直是error的回调。
- $.ajax({
- type : "POST",
- dataType : "json",
- // url : "./json.json",
- url : require.toUrl("http://localhost:8081//AirWeatherCtl/getAir.action?apicityname=%E5%8C%97%E4%BA%AC&count=1"),
- // data : {
- // "apicityname" : "天津",
- // "count" : 1
- // },
- async: false,
- cache: false,
- success : function(data) {
- debugger;
- alert(data);
- },
- error : function(data) {
- debugger;
- alert(data);
- }
- });
复制代码 |
|