将ajax结果显示为html

时间:2015-07-10 21:12:36

标签: jquery ajax

如何在下面的脚本中显示json数组元素

1 个答案:

答案 0 :(得分:0)

//Loop through JSON in data and output images using its URLs
   for (var i = 0; i < data.length; i++) { 
     var imgEl = "<img src='" + data[i].photo + "' />";
     $('#wowslider-container').append(imgEl);
   }