Loading cross-domain endpoint with AJAX

前端 未结 9 1666
醉酒成梦
醉酒成梦 2020-11-21 05:20

I\'m trying to load a cross-domain HTML page using AJAX but unless the dataType is \"jsonp\" I can\'t get a response. However using jsonp the browser is expecting a script m

9条回答
  •  旧巷少年郎
    2020-11-21 05:48

    Figured it out. Used this instead.

    $('.div_class').load('http://en.wikipedia.org/wiki/Cross-origin_resource_sharing #toctitle');
    

提交回复
热议问题