Cross Domain Ajax Request with JQuery/PHP

前端 未结 6 575
南笙
南笙 2020-11-30 13:28

Help, if you can-

The situation:

http://foobar.com includes a remotely hosted javacript file (http://boobar.com/stuff.js).

The goal is to just get an

6条回答
  •  北海茫月
    2020-11-30 13:39

    jQuery .ajax also has a setting 'crossDomain'.

    http://api.jquery.com/jQuery.ajax/

    crossDomain (default: false for same-domain requests, true for cross-domain requests)
    Type: Boolean
    If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. (version added: 1.5)
    

提交回复
热议问题