How do you get content from another domain with .load()?

后端 未结 4 1812
无人及你
无人及你 2020-12-08 12:46

Requesting data from any location on my domain with .load() (or any jQuery ajax functions) works just fine.

Trying to access a URL in a different domain doesn\'t wor

4条回答
  •  孤城傲影
    2020-12-08 12:55

    Different domains = different servers as far as your browser is concerned. Either use JSONP to do the request or use PHP to proxy. You can use jQuery.ajax() to do a cross-domain JSONP request.

提交回复
热议问题