Load external content using AJAX

后端 未结 2 889
无人及你
无人及你 2020-12-22 10:44

Is it possible to load an external site\'s content using jQuery\'s Ajax rather than an iFrame?

This is what I am trying to achieve, but it would seem there might be

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-22 11:27

    Is it possible to load an external site's content using jQuery's Ajax rather than an iFrame?

    The Same Origin Policy usually prevents it. You can work around it using JSON-P to transport that data.

    In flash you can put a cross-domain policy file in the root of the site allow certain sites to access the content of swf files or other files. Is this something that could be done using AJAX?

    Not cross-browser, the standard is too new (and unfinished)

提交回复
热议问题