(function () { const bankList = [{ name: 'airwallex', title: '银行卡', icon: 'bank_card.png' }, { name: 'google', title: 'Google支付', icon: 'google.png' }] let wrapId = document.getElementById('wrap') console.log(wrapId); for (let i = 0; i < bankList.length; i++) { const item = bankList[i]; let itemHtml = `
${item.title}
` wrapId.innerHTML += itemHtml; } })()