fetch jsonp请求接口
2021-05-23 20:30
标签:etc pca span callback form blog for class end fetch jsonp请求接口 标签:etc pca span callback form blog for class end 原文地址:http://www.cnblogs.com/dongruiha/p/7682934.htmlfunction loadTbbRec() {
var fetchJsonp = require(‘fetch-jsonp‘);
fetchJsonp(ext.info.tbbRecUrl, {
headers: {
‘Content-type‘: ‘application/x-www-form-urlencoded; charset=UTF-8‘
},
jsonpCallback: ‘callback‘,
credentials: ‘include‘
}).then(function (res) {
var obj = res.json();
obj.then(function(data) {
var str = ‘‘;
var i;
for (i in data) {
}
$(‘#carlist‘).append(str);
});
}).then(function (data) {
console.log(data);
});
}
上一篇:导航,头部,CSS基础
下一篇:PHP获取来路域名 关键字