Cross domain Ajax request from within js file

后端 未结 7 1909
清酒与你
清酒与你 2020-11-30 10:17

Here\'s the problem:

1.) We have page here... www.blah.com/mypage.html

2.) That page requests a js file www.foo.com like this...



        
7条回答
  •  有刺的猬
    2020-11-30 11:01

    JSONP was partially designed to get around the problem you are having

    http://ajaxian.com/archives/jsonp-json-with-padding

    JQuery has it in their $.getJSON method

    http://docs.jquery.com/Ajax/jQuery.getJSON

提交回复
热议问题