$(document).ready(function() {
$.ajax({
type:"post",
url:"${pageContext.request.contextPath}/query.action",
dataType:"json",
success:function(data){
if(data.length>0){
$.each(data,function(index, item){
$("#info").append("<tr id="+item.artistId+"><td>"+item.artistId+"</td>"+
"<td>"+item.artistName+"</td>"+
"<td>"+new Date(item.debutTime).toLocaleDateString()+"</td></tr>");
})
}else{
$("#table").html()
$("#table").append("没有您要查找的歌手")
}
}
})
});
01-14
1496
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-29
1330
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-09
2373
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)