遍历数组,循环内容输出,添加class

//Array
var oData =[
    {"name":"peng ya ping","id":"25"},
    {"name":"wang mou mou","id":"26"},
    {"name":"yang mou mou","id":"27"},
]
//遍历 放到ul里面
var items = "";//空的对象
for(var i=0;i   姓名: '+ oData[i].name+'  '
    items += oHtml
};
for(var i=0;i

你可能感兴趣的:(遍历数组,循环内容输出,添加class)