1.导入jstl标签库引用
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
2.导入js
3.页面
<table class="layui-table">
<thead>
<tr>
<th>[招聘]</th>
<th>序号</th>
<th>职位名称</th>
<th>公司名称</th>
<th>工作地点</th>
<th>月薪范围</th>
<th>发布时间</th>
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${not empty zhaopinlist}">
<c:forEach items="${zhaopinlist}" var="var" varStatus="vs">
<c:if test="${vs.index <3 }">
<tr>
<td>[招聘]</td>
<td>${vs.index+1}</td>
<td>${var.ZHIWEIMINGCHENG}</td>
<td>${var.QIYEMINGCHENG}</td>
<td>${var.GONGZUODIDIAN}</td>
<td>${var.YUEXINFANWEI}</td>
<td>${fn:substring(var.SHIJIAN,0,10)}</td>
</tr>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<tr class="main_info">
<td colspan="100" class="center">没有相关数据</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>