在jsp页面中,编写数据库,并将获取的内容以表格的形式展示出来,没有从数据数据库
中取出任何值时,隐藏整个表格
table定义一个id 然后根据条件判断 if(list==null&&list.size=0){$("#tableid").hide}//这样隐藏了表格,连表格头都不带的
<c:when test="${!empty(xxxxxx)}">
xxxxxx
<c:otherwise>
<h3 style="color:red;"> 对不起,xxxxxx!!!</h3>
</c:otherwise>
</c:choose>
看你用啥标签了:
c标签
此处显示表格及其内容
/c:if
此处为空,不显示表格
/c:else
其他的标签或者<%%>是一样的原理