<!DOCTYPE >
<html>
<head>
<meta charset="UTF-8">
<title>标题</title>
<script src="https://cdn.bootcss.com/jquery/2.2.0/jquery.js"></script>
</head>
<body>
<div id="aFor">
</div>
<script>
//循环渲染数组
aFor()
function aFor() {
var list = [{
a: '123',
b: 'abc'
}, {
a: '456',
b: 'efg'
}, {
a: '789',
b: 'hnk'
}]
var text = "";
var i;
for(i = 0; i < list.length; i++) {
text += "<button class='btn'>" + list[i].a + "</button>" + ' ';
text += "<span>" + list[i].b + "</span>" + "</br>";
}
document.getElem