?????[{?poster:?'tom',
???????post:?'111',
???????time:?2017-08-29T02:12:42.186Z,
???????head:?'/head/author.png',
???????comment:?[Object],
???????imgs:?[]?}?},
???????..
???????..
??]有多個(gè)這樣的數(shù)據(jù),每個(gè)數(shù)據(jù)下comment又有多個(gè)數(shù)據(jù),應(yīng)該怎樣遍歷拼接?var?html=""
for(i=0;i<data[i].length;i++){
?for(j=0;j<data[i].comment.length;j++){
?html+=..
?}
}是不是這樣兩層嵌套?這樣老是出錯(cuò)。
循環(huán)嵌套拼接字符串問(wèn)題
qq_小白_7
2017-09-03 08:49:47