【发布时间】:2017-11-16 01:09:20
【问题描述】:
我已经尝试了所有这三种方法,但由于某种原因,它们给出了错误,因为跨域访问被拒绝。我在我的应用程序的各个地方都使用了 YQL,但它现在也不起作用。
<script>
$(function() {
$.getJSON('http://www.whateverorigin.org/get?url=' + encodeURIComponent('http://google.com') + '&callback=?', function(data){
alert(data.contents);
});
});
</script>
<div id="output"></div>
可以解决或更可靠的替代方案吗?
【问题讨论】:
-
您是否尝试过使用
https?如果我使用"https://whateverorigin.herokuapp.com/get?url",它对我有用 -
是类似于
Blocked loading mixed active content "url"的错误-whateverorigin.org 被破坏并没有帮助 -
I have tried all three- 三个都是什么? -
我也尝试过
https...这三个都是yql、cors和whateverorigin.org -
@JaromandaX 是的,我认为
whateverorigin.org已损坏,但yql和 cors 也无法正常工作
标签: javascript jquery html cors yql