jsp标签总结
jsp添加 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
1 if forEach
<c:if test="${!empty userList }">
<c:forEach items="${userList}" var="user">
<tr>
<td>${user.userName }</td>
<td>${user.age }</td>
<td>
<a href="<%=basePath%>user/getUser?id=${user.id}">编辑</a>
<a href="javascript:del('${user.id }')">删除</a>
</td>
<td>${password }</td>
</tr>
</c:forEach>
</c:if>
<c:forEach items="${userList}" var="user">
<tr>
<td>${user.userName }</td>
<td>${user.age }</td>
<td>
<a href="<%=basePath%>user/getUser?id=${user.id}">编辑</a>
<a href="javascript:del('${user.id }')">删除</a>
</td>
<td>${password }</td>
</tr>
</c:forEach>
</c:if>
2
<c:out>
3 <c:redirect>
4 <c:set>
5 <c:url>
6 <c:choose>,<c:when>,<c:otherwise>
7 js判断是否为空
var exp = null;
if (!exp && typeof(exp)!="undefined" && exp!=0)
{
alert("is null");
}
var exp = null;
if (!exp && typeof(exp)!="undefined" && exp!=0)
{
alert("is null");
}
转载请注明出处:
http://blog.csdn.net/qqyouhappy/article/details/51871008