c标签的使用笔记
来源:互联网 发布:金庸 误解 知乎 编辑:程序博客网 时间:2024/06/02 05:15
项目中用到jsp中的c标签,因为之前没接触过,做个笔记方便以后再看。
判断list的length都为1则生成未被disabled的按钮
<c:choose> <c:when test="${fn:length(gasPlateDtoList)==1 && fn:length(gasCompanyDtoList)==1}"> <input type="button" value="确认支付" id="payBtn"> </c:when> <c:otherwise> <input type="button" value="确认支付" id="payBtn" disabled> </c:otherwise> </c:choose>
如果list的length为1则显示input,大于1则显示select
<c:if test="${fn:length(gasCompanyDtoList)>1}"> <select class="companyList"> <option class="company" value>请选择公司名称</option> <c:forEach items="${gasCompanyDtoList}" var="companyInfo"> <option class="company" value="${companyInfo.id}">${companyInfo.companyName}</option> </c:forEach> </select> <img class="rightArrow" src="${ctx}/resources/wx/images/right.png"></c:if>
判断list是否为空
<c:if test="${empty gasPlateDtoList}"></c:if>
使用之前fn和c标签之前要引入这些
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
阅读全文
0 0
- c标签的使用笔记
- C标签的使用
- c标签的使用
- struts学习笔记 [JSTL]<c:forEach>标签的使用
- c:forEach标签的使用
- <c:forEach>标签的使用
- <c:forEach>标签的使用
- <c:forEach>标签的使用
- <c:forEach>标签的使用
- <c:forEach>标签的使用
- jstl c标签的使用
- <c:redirect>标签的使用
- c:foreach标签的使用
- <c:forEach>标签的使用
- <c:forEach>标签的使用
- <c:forEach>标签的使用
- <c:if>标签的使用
- <c:catch>标签的使用
- C++ GUI Programming with Qt4 Second Edition 之 附录C.1 Qt Jambi入门
- Mysql用户授权
- jquery delegate事件的妙用
- 利用shell数组函数检查多个url地址的案例
- Oracle数据库 day01 火推
- c标签的使用笔记
- 距离相似度方法
- 爬虫分析之WebMagic框架篇:牛刀小试
- RedHat6.6 更换CentOS6 yum和yum源
- Codeforces
- Oracle day02 火推
- 待深入学习
- ubuntu 16.04 安装nodejs 以及问题整理
- ImageLoader 第一步全局变量 封装一个类 在清单列表中注册才可以首次登陆