首页 > 代码库 > freemark与jstl对比
freemark与jstl对比
jstl的Index.jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html ng-app><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><c:forEach var="l" items="${list}"> <c:if test="${l.getStr(‘name‘)==‘pinglun‘}"> <a href=http://www.mamicode.com/"/InfoAudit/comtModule/commentList" class="btn btn-primary btn-lg">用户评论</a> </c:if> <c:if test="${l.getStr(‘name‘)==‘tousu‘}"> <a href=http://www.mamicode.com/"/InfoAudit/comtModule/complainList" class="btn btn-primary btn-lg">用户投诉</a> </c:if></c:forEach><c:forEach var="l" items="${list}"> <c:if test="${l.getStr(‘name‘)==‘pingluntousu-selall‘}"> <span class="btn btn-default" id="s_btn" ng-click="search(2)">全部区域</span> </c:if></c:forEach></body></html>
freemark的index.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html ng-app><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body> <#if name == ‘pinglun‘}"> <a href=http://www.mamicode.com/"/InfoAudit/comtModule/commentList" class="btn btn-primary btn-lg">用户评论</a> </#if> <#if name == ‘tousu‘}"> <a href=http://www.mamicode.com/"/InfoAudit/comtModule/complainList" class="btn btn-primary btn-lg">用户投诉</a> </#if> <#if name == ‘pingluntousu-selall‘}"> <span class="btn btn-default" id="s_btn" ng-click="search(2)">全部区域</span> </#if> </body></html>
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。