且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

没有被访问控制允许来源允许

更新时间:2023-01-08 23:19:33

您不能使用XMLHtt prequest对***的API,因为浏览器的同源策略。相反,你应该使用*** API的JSON-P功能:

You cannot use XMLHttpRequest against the *** API because of the browser's same origin policy. Instead, you should use the *** API's json-p functionality:

HTTP://$c$c.google.com/的API / ***的/ 2.0 / developers_guide_json.html

编辑:截至2012年5月18日,在*** API支持CORS:的 http://apiblog.***.com/2012/05/unlocking-javascripts-potential-with.html

As of May 18, 2012, the *** API supports CORS: http://apiblog.***.com/2012/05/unlocking-javascripts-potential-with.html