map小测试

2019-05-28  本文已影响0人  jianshu_4219

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

上一篇下一篇

猜你喜欢

热点阅读