接口地址 :http://apis.baidu.com/txapi/d...请求方法 :GET请求参数(header) :apikey: "您自己的APIkey"这是百度一个API请求的格式要求 下面是我写的请求function clickButton(){ $.ajax({ url: "http://apis.baidu.com/txapi/dictum/dictum", type:'GET', data: { header: { apikey:"847dc263c57e01777dae47dac857dd87" } }, success: function(response) { var r = JSON.parse(response); document.getElementById("quote-word").innerHTML=r.quote; } });};'''可是不知道为啥,请求就是不成功,求教各位。。谢谢大家
添加回答
举报
0/150
提交
取消