前端数据的展示遇到应table展示时
来源:互联网 发布:雅诗兰黛眼霜 知乎 编辑:程序博客网 时间:2024/06/10 13:48
方法一:把显示的值写到<td>标签之间。
<div class="jf_con present_con">
<table cellspacing="0" class="js-zjls-table">
<tbody>
<tr class="jf_table_top">
<td width="12.35%">奖品名称</td>
<td width="14.66%">奖品图片</td>
<td width="20.5%">奖品描述</td>
<td width="13.45">中奖时间</td>
<td width="20.5%">活动名称</td>
<td width="8.8%">领奖状态</td>
<td width="8.8%">操作</td>
</tr>
<c:forEach var="prizeReturnInfo"
items="${prizeRturnInfoDtoList}" varStatus="status">
<tr>
<td>${prizeReturnInfo.prizeName} </td>
<td><img src="${prizeReturnInfo.prizePic}"style="width:133px; height:139px;"></td>
<td class="padding-20">${prizeReturnInfo.prizeDis}</td>
<td>${prizeReturnInfo.prizeTime}</td>
<td class="padding-20">${prizeReturnInfo.activityName}</td>
<td>${prizeReturnInfo.acceptState}</td>
<td class="border-r-no">
<c:if test="${prizeReturnInfo.acceptState eq '未领奖'}"><a href='javascript:;' onclick='receiveReward(${prizeReturnInfo.lotteryId},${prizeReturnInfo.giftFlag})' class='receiveReward'>领奖</a></c:if>
<c:if test="${prizeReturnInfo.acceptState eq '已领奖'}"><a href='javascript:;' >---</a></c:if>
<c:if test="${prizeReturnInfo.acceptState eq '已过期'}"><a href='javascript:;' >---</a></c:if>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
方法2: 利用<c:out>标签。
<table>
<tbody>
<tr class="titile">
<td class="bx_name1 car_num_info"> 姓名</td>
<td class="bx_name2">性别</td>
<td class="bx_name3">证件类型</td>
<td class="bx_name4">证件号</td>
<td class="bx_name5">出生日期</td>
<td class="bx_name6">手机号</td>
<td class="bx_name7">电子邮箱</td>
<td class="bx_name8 car_num5_info">操作</td>
</tr>
<c:forEach items="${insuredList }" var="insuredval"
varStatus="num">
<tr class="titile_info">
<td style="display: none;"
title="<c:out value="${insuredval.sid }" />" id="insuredSid"><c:out
value="${insuredval.sid}" /> </td>
<td class="bx_name1 car_num_info" title="<c:out value="${insuredval.insuredname}" />">
<c:choose>
<c:when test="${fn:length(insuredval.insuredname)>4}">
<c:out
value="${fn:substring(insuredval.insuredname,0,4)}..." />
</c:when>
<c:otherwise>
${insuredval.insuredname}
</c:otherwise>
</c:choose></td>
<td class="bx_name2" id="${insuredval.insuredsex}"><c:choose>
<c:when test="${insuredval.insuredsex eq '1'}">
男
</c:when>
<c:when test="${insuredval.insuredsex eq '2' ||insuredval.insuredsex eq '0' }">
女
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose></td>
<td class="bx_name3" id='${insuredval.identitytype}'><c:if
test="${insuredval.identitytype eq '01'}">身份证</c:if> <c:if
test="${insuredval.identitytype eq '02'}">户口簿</c:if> <c:if
test="${insuredval.identitytype eq '03'}">护照</c:if> <c:if
test="${insuredval.identitytype eq '04'}">军人证件</c:if> <c:if
test="${insuredval.identitytype eq '10'}">往来港澳通行证</c:if> <c:if
test="${insuredval.identitytype eq '09'}">大陆居民往来台湾通行证</c:if>
<c:if test="${insuredval.identitytype eq '25'}">港澳居民来往内地通行证</c:if>
<c:if test="${insuredval.identitytype eq '26'}">台湾居民往来内地通行证</c:if>
<c:if test="${insuredval.identitytype eq '07'}">港澳居民身份证</c:if>
<c:if test="${insuredval.identitytype eq '99'}">其他</c:if>
<c:if test="${insuredval.identitytype eq '16'}">外国人永久居留身份证</c:if>
<c:if test="${insuredval.identitytype eq '06'}"></c:if>
</td>
<td class="bx_name4" title="<c:out value="${insuredval.identitynumber}" />"><c:choose>
<c:when test="${fn:length(insuredval.identitynumber)>18 }">
<c:out
value="${fn:substring(insuredval.identitynumber,0,18)}" />
</c:when>
<c:when test="${insuredval.identitytype eq '06'}">
</c:when>
<c:otherwise>
${insuredval.identitynumber}
</c:otherwise>
</c:choose> </td>
<td class="bx_name5" title="<fmt:formatDate value="${insuredval.insuredbirthday}" pattern="yyyy/MM/dd"/>"><fmt:formatDate value="${insuredval.insuredbirthday}"
pattern="yyyy/MM/dd" /></td>
<td class="bx_name6" title="<c:out value="${insuredval.insuredmobile}" />"><c:out
value="${insuredval.insuredmobile}" /></td>
<td class="bx_name7" title="<c:out value="${insuredval.insuredemail}" />"><c:choose>
<c:when test="${fn:length(insuredval.insuredemail)>6}">
<c:out
value="${fn:substring(insuredval.insuredemail,0,6)}..." />
</c:when>
<c:otherwise>
${insuredval.insuredemail}
</c:otherwise>
</c:choose></td>
<td style="display: none;"
title="<c:out value="${insuredval.flag}" />" id=""><c:out
value="${insuredval.flag}" /></td>
<td class="bx_name8 car_num5_info"><a href="#" style="margin-left: 0;" onclick="changeDefaultTo(this);return false;">
<c:choose>
<c:when test="${insuredval.flag==1}"> 取消默认</c:when>
<c:otherwise> 设为默认</c:otherwise>
</c:choose></a>
<a href="#" class="xiugai_username" onclick="modifyPersonNew(this);">修改</a>
<a href="#" style="margin-left: 0;" onclick="doDelete(this);return false;"> | 删除</a></td>
</tr>
</c:forEach>
</tbody>
</table>d
- 前端数据的展示遇到应table展示时
- 前端数据展示的评价标准
- 在tableView上展示数据时遇到的问题
- 十四、bootstrap-table 展示数据
- 后端数据展示到前端
- ADF中改变table每页展示数据的行数
- 【Django】本地csv数据的页面table展示
- 基于ArcSDE 的Web前端海量数据展示
- 数据的图表展示
- WebView的数据展示
- bootstrap-table 表头数据展示错位
- boostrap-table插件分页展示表格数据
- Bootstrap Table获取并展示数据列表
- 数据库订单数据读取到前端展示
- 数据展示
- 根据读取后台配置(前端动态化展示table.)
- bootstrap table通过ajax获取后台数据展示在table
- iOS展示pdf签名时遇到的问题及解决办法
- solr安装配置,两种方法
- 注释最全的Android购物车简单实现,复制可用,阅读可懂
- 排序-选择排序
- 学习激励一下自己
- 怎么用svg画一个圆圈(一)
- 前端数据的展示遇到应table展示时
- Core Animation实战二(寄宿图)
- msyql全局搜索字段所在位置
- 全面的MySQL优化详解
- Spring容器加载完毕干一件事情(利用ContextRefreshedEvent事件)
- 在写<a>链接的href属性时 = 号 后面不能用空格,否则controller层接收不到参数值
- Jenkins+Jmeter+Ant自动化集成环境
- MZX大佬授课のDAY2
- 非法参数异常- DrawerLayout 必须与 MeasureSpec.EXACTLY 测量