<fmt:formatDate value="${activityDetail.activityEndTime}" pattern="yyyy-MM-dd HH:mm:ss" var="trainDate"/> <fmt:formatDate value="${now}" type="both" dateStyle="long" pattern="yyyy-MM-dd HH:mm:ss" var="nowDate"/> <c:if test="${nowDate gt trainDate}" var="rs"> <a href="javascript:void(0)" title="" class="bm" style="background-color: #B1B1B1;" >已 结 束</a></div> </c:if> <c:if test="${!rs}"> <a href="javascript:void(0)" title="" class="bm" onclick="applySubmit();">报 名</a></div> </c:if>
页面上要加
<jsp:useBean id="now" class="java.util.Date" />
var 在fmt里的意思是相当于搞个别名