Making JavaScript call across domains

后端 未结 2 1998
迷失自我
迷失自我 2020-12-22 01:35

Here\'s the goal:

Hand off a script tag that references a JavaScript file on a remote server. That JavaScript file should return HTML that will then be displayed on

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-22 02:17

    You will need a server-side proxy for x-domain calls.

    There are many implementations available online or you could probably whip one up in language of your choice to fit into your stack.

    More info with graphics and a PHP proxy available here - http://developer.yahoo.com/javascript/howto-proxy.html

提交回复
热议问题