赞
踩
wxml 遍历用 wx:for
for (var index in res.data) {
title : res.data[index].title
}
for (var i = 0; i < datas.length; ++i) {
console.log(i);
console.log(datas[i].name);
}
yourData.forEach(function(item, index){
console.log(item);
console.log(index);
})
<view wx:for="{{array}}" wx:for-index="idx" wx:for-item="item">
{{item.message}}
</view>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。