AngularJS+Servlet跨域问题
一、JSONP
Controller代码如下:
var myUrl = "http://localhost:8080/domainServer/TestServlet?callback=JSON_CALLBACK";
$http({method:"JSONP", url: myUrl, cache: false}).success( //cache为true时只向服务器发送一次请求
原创
2015-06-25 14:12:53 ·
943 阅读 ·
0 评论