js 一数组分割成若干个数组,并装换成字符串赋个li标签
2021-04-10 20:28
标签:++ res lan html success 处理 n+1 OLE java js 一数组分割成若干个数组,并装换成字符串赋个li标签 标签:++ res lan html success 处理 n+1 OLE java 原文地址:https://www.cnblogs.com/opcec/p/13365658.htmlsuccess: function (datas) { //请求成功后处理函数。
var htmltext = ‘‘;
var data = datas.result;
console.log(data)
var ihtml = [];
for (var i in data) {
ihtml.push(‘
ul class="coop-ul">
li>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/01.png" width="190">
div>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/02.png" width="190">
div>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/03.png" width="190">
div>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/04.png" width="190">
div>
li>
li class="li2">
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/05.png" width="190">
div>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/06.png" width="190">
div>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/07.png" width="190">
div>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/08.png" width="190">
div>
li>
li class="li3">
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/09.jpg" width="190">
div>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/10.jpg" width="190" height="120">
div>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/07.png" width="190">
div>
div class="col-md-3 col-sm-6 col-xs-6">
img src="img/08.png" width="190">
div>
li>
ul>
文章标题:js 一数组分割成若干个数组,并装换成字符串赋个li标签
文章链接:http://soscw.com/index.php/essay/73949.html