jsp页面常用标签
2014-03-06 16:49
375 查看
1、前台遍历list标签,window.open方法的使用。
<display:table requestURI="/" id="list" name="list" styleClass="displaytable" defaultsort="0" cellpadding="0" cellspacing="1" border="1" pagesize="15">
<display:column title="名称" sortable="true" property="属性名称" width="5%" align="center"/>
<display:column title="编号" align="center" width="10%" sortable="true">
<a href="#" onclick="window.open('spareinfo.dotype=spareapplydetail&apply_code=<c:out value="${aLst.spare_apply_code}"/>' ,'spareapply','width='+window.screen.width*2/3+',height='+window.screen.height*3/5+',left='+window.screen.width/6+',top='+window.screen.height/5+',status=no,fullscreen=no,toolbar=no,menubar=no,location=no,scrollbars=1,resizable=yes');">
<c:out value="${aLst.spare_apply_code}"/>
</a>
</display:column>
</display:table>
2、if判断
<c:if test="${}">
3、表格制作
<style type="text/css">
table {
align: center;
border-collapse: collapse;
}
table th {
border: 1px solid #000;
font-size:12px;
padding: 3px 3px 3px 3px;
text-align: center;
width: 60px;
}
table td {
border: 1px solid #000;
font-size:12px;
padding: 3px 3px 3px 3px;
text-align: center;
width: 60px;
}
</style>
<table>
<tr>
<th>单位</th>
<th>总计</th>
<th>上级通知</th>
<th>消缺</th>
<th>其他临检</th>
<th>计划检修</th>
<th>免考</th>
<th>考核</th>
<th>临检率</th>
<th>回退票数</th>
<th>回退率</th>
</tr>
<%
for (Map<Integer, String> map : mapList) {
if (map.get(1) != null) {
%>
<tr>
<td><%=map.get(1)==null?" ":map.get(1)%></td>
<td><%=map.get(2)==null?"":map.get(2)%></td>
<td><%=map.get(3)==null?"":map.get(3)%></td>
<td><%=map.get(4)==null?"":map.get(4)%></td>
<td><%=map.get(5)==null?"":map.get(5)%></td>
<td><%=map.get(6)==null?"":map.get(6)%></td>
<td><%=map.get(7)==null?"":map.get(7)%></td>
<td><%=map.get(8)==null?"":map.get(8)%></td>
<td><%=map.get(9)==null?"":map.get(9)%></td>
<td><%=map.get(10)==null?"":map.get(10)%></td>
<td><%=map.get(11)==null?" ":map.get(11)%></td>
</tr>
<%
} else {
%>
<td colspan="11"> </td>
<%
} }
%>
</table>
4、前台显示下拉列表
<html:select property="specialty_id" styleClass="MySelect" style="width :65%"
onchange="document.all.specid.value='1';document.all.find.value='yes';document.getElementsByTagName('form')[0].submit()">
<html-el:options collection="specidLst" property="value" labelProperty="label"/>
</html:select>
屏蔽 style="display:none;"
<display:table requestURI="/" id="list" name="list" styleClass="displaytable" defaultsort="0" cellpadding="0" cellspacing="1" border="1" pagesize="15">
<display:column title="名称" sortable="true" property="属性名称" width="5%" align="center"/>
<display:column title="编号" align="center" width="10%" sortable="true">
<a href="#" onclick="window.open('spareinfo.dotype=spareapplydetail&apply_code=<c:out value="${aLst.spare_apply_code}"/>' ,'spareapply','width='+window.screen.width*2/3+',height='+window.screen.height*3/5+',left='+window.screen.width/6+',top='+window.screen.height/5+',status=no,fullscreen=no,toolbar=no,menubar=no,location=no,scrollbars=1,resizable=yes');">
<c:out value="${aLst.spare_apply_code}"/>
</a>
</display:column>
</display:table>
2、if判断
<c:if test="${}">
3、表格制作
<style type="text/css">
table {
align: center;
border-collapse: collapse;
}
table th {
border: 1px solid #000;
font-size:12px;
padding: 3px 3px 3px 3px;
text-align: center;
width: 60px;
}
table td {
border: 1px solid #000;
font-size:12px;
padding: 3px 3px 3px 3px;
text-align: center;
width: 60px;
}
</style>
<table>
<tr>
<th>单位</th>
<th>总计</th>
<th>上级通知</th>
<th>消缺</th>
<th>其他临检</th>
<th>计划检修</th>
<th>免考</th>
<th>考核</th>
<th>临检率</th>
<th>回退票数</th>
<th>回退率</th>
</tr>
<%
for (Map<Integer, String> map : mapList) {
if (map.get(1) != null) {
%>
<tr>
<td><%=map.get(1)==null?" ":map.get(1)%></td>
<td><%=map.get(2)==null?"":map.get(2)%></td>
<td><%=map.get(3)==null?"":map.get(3)%></td>
<td><%=map.get(4)==null?"":map.get(4)%></td>
<td><%=map.get(5)==null?"":map.get(5)%></td>
<td><%=map.get(6)==null?"":map.get(6)%></td>
<td><%=map.get(7)==null?"":map.get(7)%></td>
<td><%=map.get(8)==null?"":map.get(8)%></td>
<td><%=map.get(9)==null?"":map.get(9)%></td>
<td><%=map.get(10)==null?"":map.get(10)%></td>
<td><%=map.get(11)==null?" ":map.get(11)%></td>
</tr>
<%
} else {
%>
<td colspan="11"> </td>
<%
} }
%>
</table>
4、前台显示下拉列表
<html:select property="specialty_id" styleClass="MySelect" style="width :65%"
onchange="document.all.specid.value='1';document.all.find.value='yes';document.getElementsByTagName('form')[0].submit()">
<html-el:options collection="specidLst" property="value" labelProperty="label"/>
</html:select>
屏蔽 style="display:none;"
相关文章推荐
- springmvc中自定义日期转换器及其jsp页面日期显示的一个常用标签
- 如何在JSP页面快速输出从Servlet接收的数据_看JSTL常用C标签的威力
- JSP页面中常用四种标签
- JSP页面中常用四种标签
- jsp页面常用标签
- jsp页面中c标签 运用
- JSP页面查询显示常用模式
- JSP页面查询显示常用模式
- springboot 常用两种图形形式(thymeleaf模板,jsp页面)
- JSP页面查询显示常用模式 (附源代码)
- JSP页面中的标签以及内置对象request等
- javaWeb-08-jsp常用标签
- jsp常用的指令与标签
- struts2返回到JSP页面的html字符串如何在JSP页面上解析成html标签 (ognl表达式)
- 用定制标签库和配置文件实现对JSP页面元素的访问控制
- JSP页面,脚本标签
- 利用jsp标签完成将用户登录的信息显示到该页面
- JSP页面JSTL提供的函数标签EL表达式操作字符串的方法
- 如何在JSP页面中使用JSTL标签实现if和if-else判断,判断条件使用<%=value%>
- Struts2页面开发中常用标签使用规范