var data_li = document.getElementById("data_li")
let str = ''
console.log(arr.length)
arr.map((item, index) => {
str += '<li>' +
'<span>' + item.name + '</span>' +
'<span>' + item.score + '</span>' +
'</li>'
})
data_li.innerHTML = str
var data_li = document.getElementById("data_li")
let str = ''
console.log(arr.length)
arr.map((item, index) => {
str += '<li>' +
'<span>' + item.name + '</span>' +
'<span>' + item.score + '</span>' +
'</li>'
})
data_li.innerHTML = str
本文标题:map小测试
本文链接:https://www.haomeiwen.com/subject/qdhdtctx.html
网友评论