我是靠谱客的博主 无辜电话,这篇文章主要介绍用es6请求接口循环出结果,现在分享给大家,希望可以做个参考。

function easyAjax() {
$. ajax({
type: "post",
// url: "/api/app/portal/partner/type",
url: ajaxUrl + "/api/app/portal/partner/type",
dataType: "json",
beforeSend : function () {
},
error : function ( err) {
},
success : function ( res) {
let a = res. data. map(( item) => {
return `<a href="second.html?ID= ${ item. ID } ">
<dl>
<dd>
<h4 class="name"> ${ item. TypeName } </h4>
</dd>
</dl>
</a >
`
});

$( '.integral'). append( a. join( ''));
}
})
}

最后

以上就是无辜电话最近收集整理的关于用es6请求接口循环出结果的全部内容,更多相关用es6请求接口循环出结果内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(68)

评论列表共有 0 条评论

立即
投稿
返回
顶部