您的位置:首页 > 理论基础 > 计算机网络

http://ip.taobao.com/service/getIpInfo.php?ip=114.222.51.186. Response to preflight request doesn't

2017-07-24 00:00 615 查看
摘要: http://blog.csdn.net/xpzhang123/article/details/50592995
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){
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐