🔥 오늘의 목표
📝 노트필기 및 정리
- 진도
1.
$(function (){
getCelebrity()
})
function getCelebrity(){
$.ajax({
type: "GET",
url: "/i-am-catholic/celebrities",
data: {
"queryType": "전체",
"query": ""
},
success: function (result) {
console.log(result);
let listTag = "";
if ( result.content.length !=0 ) {
result.content.forEach(function (item) {
if (item.celebrityCatholic.area == null) item.celebrityCatholic.area = "-";
listTag +=
"<tr>" +
"<td><input type='checkbox' class='cont-check'></td>" +
"<td onclick='location.href='./celebrityDetail.jsp''>10</td>" +
"<td onclick='location.href='./celebrityDetail.jsp''>"+item.name+"</td>" +
"<td onclick='location.href='./celebrityDetail.jsp''>"+item.job+"</td>" +
"<td onclick='location.href='./celebrityDetail.jsp''><p><span class='blue'>"+item.celebrityCatholic.category+"</span>"+item.celebrityCatholic.baptismalName+"</p></td>" +
"<td onclick='location.href='./celebrityDetail.jsp''>"+item.celebrityCatholic.baptismalDate+"</td>" +
"<td onclick='location.href='./celebrityDetail.jsp''>"+item.celebrityCatholic.status+"</td>" +
"<td onclick='location.href='./celebrityDetail.jsp''>"+item.celebrityCatholic.area+"</td>" +
"<td onclick='location.href='./celebrityDetail.jsp''>"+item.celebrityCatholic.year+"</td>" +
"</tr>";
});
$(".celebrityList").html(listTag);
}
}
})
}