http://jsfiddle.net/baEXg/ 我不知道为什么它不起作用,“按钮”起作用,$.getJSON 以下的任何内容都不起作用
最佳答案
如果你想要$.getJSON()
请求被视为 JSONP
,您必须在 URL 中指定 callback=?
。
甚至在 docs 中,请教他们,他们不咬人:
If the URL includes the string "callback=?" (or similar, as defined by the server-side API), the request is treated as JSONP instead.
这是一个forked demo of your code .
关于javascript - JSONP 不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7374262/