文章詳情頁
javascript - 七牛接口跨域
瀏覽:72日期:2023-03-07 16:47:49
問題描述
XMLHttpRequest cannot load http://api.qiniu.com/status/g... No ’Access-Control-Allow-Origin’ header is present on the requested resource. Origin ’http://192.168.1.54:8080’ is therefore not allowed access.
$.ajax({
url:’http://api.qiniu.com/status/get/prefop?id=z0.5923a37345a2650c9977c17e’, type:'GET', dataType:'json', success:function(data){console.log(data) }});
問題解答
回答1:dataType: ’jsonp’
jquery jsonp跨域
標簽:
JavaScript
相關文章:
排行榜
