function Ajax_GetCourseAndResource(data) {
$(".ol-course-list").empty();
var html = "";
var len = data.Data.length;
for (var i = 0; i < len; i++) {
var len2 = data.Data[i].Resourceses.length;
html += ' <div class="ol-course-list">' +
'<h2>' + data.Data[i].Title + '</h2>' +
' <table class="ol-table"><tbody>';
for (var j = 0; j < len2; j++) {
if ((j % 3) == 0) {
html += '<tr>' +
'<td><span><a href="' + data.Data[i].Resourceses[j].FilePath + '">' +
data.Data[i].Resourceses[j].Name + '</a></span></td>';
} else {
html += '<td><span><a href="' + data.Data[i].Resourceses[j].FilePath + '">' +
data.Data[i].Resourceses[j].Name + '</a></span></td>';
}
}
}
$(".ol-course-list").append(html);
}
![](//images0.cnblogs.com/blog/290106/201401/171628044869.png)