XMLHttpRequest cannot load http://ip.taobao.com/service/getIpInfo.php?ip=114.222.51.186. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.
no access-control-allow-origin'header怎么设置 10
稻子E63YX | 浏览 16571 次
发布于2015-07-21 10:40最佳答案
跨域只能使用JSONP来实现,或者通过服务器端获取 另外,Access-Control-Allow-Origin 方法可以参考 http://blog.csdn.net/net_lover/article/details/5172509 http://blog.csdn.net/net_lover/article/details/5172522 http://blog.csdn.net/net_lover/article/details/5172532
No 'Access-Control-Allow-Origin' header is present on the requested resource.
你好,请问这个问题解决了吗
小钱被占用 | 浏览 12338 次
发布于2017-02-06 16:14最佳答案
$.ajax({
url:"http://yingyan.baidu.com/api/v3/entity/list",
type:'GET',
dataType:'JSONP', // 处理Ajax跨域问题
success: function(data){