有如下数据:
{
"data": [
{
"title": "标题1",
"link": "",
"date": "2018-6-26",
"views": 153,
"info": "简述简述简述简述简述简述简述"
},
{
"title": "标题2",
"link": "",
"date": "2018-6-25",
"views": 460,
"info": "简述简述简述简述简述简述简述"
},
{
"title": "标题3",
"link": "",
"date": "2018-6-24",
"views": 392,
"info": "简述简述简述简述简述简述简述"
},
{
"title": "标题4",
"link": "",
"date": "2018-6-23,
"views": 318,
"info": "简述简述简述简述简述简述简述"
},
{
"title": "标题5",
"link": "",
"date": "2018-6-22",
"views": 241,
"info": "简述简述简述简述简述简述简述"
},
{
"title": "标题6",
"link": "",
"date": "2018-6-21",
"views": 283,
"info": "简述简述简述简述简述简述简述"
},
{
"title": "标题7",
"link": "",
"date": "2018-6-20",
"views": 216,
"info": "简述简述简述简述简述简述简述"
}
]
}
html结构如下
<ul>
<li>
<div>1</div>
<div>2</div>
</li>
<li>
<div>3</div>
<div>4</div>
</li>
<li>
<div>5</div>
<div>6</div>
</li>
<li>
<div>7</div>
<div>8</div>
</li>
</ul>
请问js如何用如上数据循环生成这样的有序html结构?
一只斗牛犬
白猪掌柜的
素胚勾勒不出你
相关分类