Cross-domain requests with JQuery using YQL

后端 未结 4 1959
甜味超标
甜味超标 2021-01-16 17:29

So I need to make a a cross domain request where the response is not JSON formatted, so I cannot use .getJSON. .get obviously doesn\'t work because it is a cross domain requ

4条回答
  •  难免孤独
    2021-01-16 17:51

    Yeah, cross browser scripting. You can't AJAX anything like that since it violates the same domain policy.

    You are going to have to setup a proxy on the same server the JavaScript is running from.

    Edit Lookslike you need the $('#container').load(url) bit for that to work.

    Go back an reread the linked article carefully.

提交回复
热议问题