No response from MediaWiki API using jQuery

后端 未结 4 994
忘掉有多难
忘掉有多难 2020-11-30 04:12

I\'ve tried to get some content from Wikipedia as JSON:

$.getJSON(\"http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&         


        
4条回答
  •  一生所求
    2020-11-30 05:00

    You'll need to use getJSONP if your getting data from another domain, it's part of the "same origin policy".

    EDIT

    Actually what Nick said, slap &callback=? on the end of your query string to invoke getJSONP.

提交回复
热议问题