請(qǐng)求報(bào)錯(cuò) 了。。
XMLHttpRequest cannot load http://api.bing.com/qsonhs.aspx?q=a. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
XMLHttpRequest cannot load http://api.bing.com/qsonhs.aspx?q=a. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
2015-04-24
舉報(bào)
2015-04-24
因?yàn)榭缬蛄?,除非接口支持JSON-P,否則不能直接在頁(yè)面ajax加載。
可以用服務(wù)端語(yǔ)言在本地搭建服務(wù)器,比如php curl接口再返回給前端。
或者還有個(gè)解決辦法,修改HOST文件把調(diào)用的網(wǎng)頁(yè)設(shè)定到api.bing.com。