美文网首页
提供2种本地跨域问题

提供2种本地跨域问题

作者: mindy1031 | 来源:发表于2018-07-09 15:09 被阅读0次

1、网址前加链接

$.ajax({

url:"https://bird.ioliu.cn/v1/?url=自己的请求网址",

dataType: "json",

aysn: true,

data: { },

success:function(res){ console.log(res) },

error:function(res){ console.log(res) }

});

2、在谷歌浏览器中配置

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir

每次打开时,先将所有的谷歌浏览器关闭,重新打开,如上图提示图所示,再将网址放到这个页面中就可以啦

相关文章

网友评论

      本文标题:提供2种本地跨域问题

      本文链接:https://www.haomeiwen.com/subject/tvftpftx.html