前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >JSP 常用语法

JSP 常用语法

作者头像
Remember_Ray
发布2020-01-21 17:12:42
5070
发布2020-01-21 17:12:42
举报
文章被收录于专栏:Ray学习笔记Ray学习笔记

if

代码语言:javascript
复制
<c:if test="${pAqjc.act.taskDefKey eq 'pAqjc2' || pAqjc.act.taskDefKey eq 'pAqjc5' || empty pAqjc.act.procInsId}">
	
</c:if>

或

<c:if test="${not empty pAqjc.act.procInsId && (pAqjc.act.taskDefKey eq 'pAqjc1' || pAqjc.act.taskDefKey eq 'pAqjc4'|| pAqjc.act.taskDefKey eq 'pAqjc6')}">

</c:if>

或

<c:if test="${pAqjc.act.taskDefKey ne 'pAqjc2' && pAqjc.act.taskDefKey ne 'pAqjc5'}">

</c:if>

foreach

代码语言:javascript
复制
<c:forEach items="${page.list}" var="pAqjsjdCharge">
	<tr>
		<td> <input type="checkbox" id="${pAqjsjdCharge.id}" class="i-checks"></td>
		<td><a  href="#" onclick="openDialogView('查看安全技术交底_涉及人员', '${ctx}/aqsc/pAqjsjdCharge/form?id=${pAqjsjdCharge.id}','800px', '500px')">
			${pAqjsjdCharge.aqjsjdId}
		</a></td>
		<td>
			${pAqjsjdCharge.type}
		</td>
		<td>
			${pAqjsjdCharge.user.name}
		</td>
		<td>
			<shiro:hasPermission name="aqsc:pAqjsjdCharge:view">
				<a href="#" onclick="openDialogView('查看安全技术交底_涉及人员', '${ctx}/aqsc/pAqjsjdCharge/form?id=${pAqjsjdCharge.id}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
			</shiro:hasPermission>
			<shiro:hasPermission name="aqsc:pAqjsjdCharge:edit">
				<a href="#" onclick="openDialog('修改安全技术交底_涉及人员', '${ctx}/aqsc/pAqjsjdCharge/form?id=${pAqjsjdCharge.id}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
			</shiro:hasPermission>
			<shiro:hasPermission name="aqsc:pAqjsjdCharge:del">
				<a href="${ctx}/aqsc/pAqjsjdCharge/delete?id=${pAqjsjdCharge.id}" onclick="return confirmx('确认要删除该安全技术交底_涉及人员吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
			</shiro:hasPermission>
		</td>
	</tr>
</c:forEach>

form

代码语言:javascript
复制
<form:form id="searchForm" modelAttribute="pAqjsjdCheck" action="${ctx}/aqsc/pAqjsjdCheck/" method="post" class="form-inline">
	// <form:hidden path="id"/>
	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
	<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
	<div class="form-group">
		<span>安全技术交底_id:</span>
			<form:input path="aqjsjdId" htmlEscape="false" maxlength="50"  class=" form-control input-sm"/>
	 </div>	
	 
	// <input id="zjWcSj" name="zjWcSj" type="text" maxlength="20" class="laydate-icon form-control layer-date " value="<fmt:formatDate value="${pDeszGzp.zjWcSj}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
	 
	// <form:textarea path="zgyq" htmlEscape="false" rows="4"    class="form-control "/> 
	
	//<form:select path="aqiLevel" class="form-control ">
	//	<form:option value="" label="请选择空气质量指数级别"/>
	//	<form:options items="${fns:getDictList('aqi_level')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
	//</form:select>
</form:form>


<div class="pull-right">
	<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
	<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
</div>


function search(){//查询,页码清零
	$("#pageNo").val(0);
	$("#searchForm").submit();
		return false;
}

function reset(){//重置,页码清零
$("#pageNo").val(0);
$("#searchForm div.form-group input").val("");
$("#searchForm div.form-group select").val("");
$("#searchForm").submit();
	return false;
 }
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-11-21,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • if
  • foreach
  • form
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档