好久没用了,记录一下,说不定哪天用上呢。
JSTL与SELECT的对接
两种方法,
一种是<c:if>
<select name="FENR_STATUS">
<option value="" selected>学籍状态</option>
<option value="999" <c:if test="${_info.fenrStatus==999}">selected</c:if>>全部</option>
<option value="0" <c:if test="${_info.fenrStatus==0}">selected</c:if>>在籍</option>
<option value="1" <c:if test="${_info.fenrStatus==1}">selected</c:if>>已毕业</option>
<option value="2" <c:if test="${_info.fenrStatus==2}">selected</c:if>>休学</option>
<option value="3" <c:if test="${_info.fenrStatus==3}">selected</c:if>>停学</option>
<option value="4" <c:if test="${_info.fenrStatus==4}">selected</c:if>>退学</option>
<option value="5" <c:if test="${_info.fenrStatus==5}">selected</c:if>>转学</option>
</select>
一种是<c:choose>
<select name="fgraduationState">
<c:choose>
<c:when test="${_info.fgraduationState eq 0}"><option value="0" selected>毕业</option></c:when>
<c:when test="${_info.fgraduationState eq 1}"><option value="1" selected>结业</option></c:when>
<c:when test="${_info.fgraduationState eq 2}"><option value="2" selected>未结业</option></c:when>
<c:when test="${_info.fgraduationState eq 3}"><option value="3" selected>肄业</option></c:when>
</c:choose>
</select>
用哪一种就仁者见仁,智者见智了。
PS:第一种适合用select ,第二种适合根据值的不同显示不同内容。
相关推荐
EL,jstl,js 对select元素EL,jstl,js 对select元素EL,jstl,js 对select元素
JSTL函数JSTL函数JSTL函数JSTL函数JSTL函数JSTL函数JSTL函数JSTL函数
JSTL标签JSTL标签JSTL标签JSTL标签JSTL标签JSTL标签JSTL标签JSTL标签JSTL标签JSTL标签JSTL标签JSTL标签
jstl-1.2.1,之前的版本需要在服务器中配置一下,而且它分成了两个jar(jstl.jar和standard.jar)还有一个tld文件,而1.2已经不用配置了,直接把javax.servlet.jsp.jstl-1.2.1.jar和javax.servlet.jsp.jstl-api-1.2.1...
jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2.jar下载jstl-1.2...
JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>JSTL>>>
jstl插件与底层源码
JSTL与Jquery的小例子 比较全的例子
jstl帮助 jstl帮助手册 jstl帮助文档
jstl,jstl实例源码jstl,jstl实例源码
jstl-api-1.2和jstl-impl-1.2,jstl-api-1.2和jstl-impl-1.2,jstl-api-1.2和jstl-impl-1.2,jstl-api-1.2和jstl-impl-1.2
jstl标签详解jstl标签详解jstl标签详解jstl标签详解jstl标签详解jstl标签详解jstl标签详解
jstl与el表达式所需jar,standard.jar/jstl.jar等jar包
jstl.jar和standard.jar的jar包,需要在web项目中使用这两个jar包,放在项目的web-inf/lib文件夹下即可
使用jstl标签库所需jar包,内含jstl与standard两包,绝对真实可靠,值得信赖!
本人对jstl的一点小总结 JSTL是一个不断完善的开放源代码的JSP标签库,是由apache的jakarta小组来维护的。JSTL只能运行在支持JSP1.2和Servlet2.3规范的容器上,如tomcat 4.x。但是在即将推出的JSP 2.0中是作为标准...
JSTL中文帮助文档 JSTL中文帮助文档 JSTL中文帮助文档 。。。
综合的JSTL练习实例,JSTL表情的用法
jstl 表达式 很好的例子!! 欢迎下载使用