<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp" %>
<duowan:override name="head">
<title>服务器版本修改</title>
<script type="text/javascript">
function updateEvent(){
var form = document.forms[0];
if(validateIsSelect(form.all, form.dimIvers)){
form.action='${ctx}/dimIver/batchUpdateIver.do';
form.status.value=1;
form.submit();
}else{
alert("请选择要操作的记录");
}
}
function resetEvent(){
var form = document.forms[0];
if(validateIsSelect(form.all, form.dimIvers)){
form.action='${ctx}/dimIver/batchUpdateIver.do';
form.status.value=0;
form.submit();
}else{
alert("请选择要操作的记录");
}
}
function allselect(allobj,items){
var state = allobj.checked;
if(items.length){
for(var i=0;i<items.length;i++){
if(!items[i].disabled) items[i].checked=state;
}
}else{
if(!items[i].disabled) items.checked=state;
}
}
/*
* 判断是否选择了记录
*/
function validateIsSelect(allobj,items){
var state = allobj.checked;
if(items.length){
for(var i=0;i<items.length;i++){
if(items[i].checked) return true;
}
}else{
if(items.checked) return true;
}
return false;
}
</script>
</duowan:override>
<duowan:override name="content">
<!--home{-->
<div id="home">
<!--overview{-->
<div id="overview">
<div class="col_1">
<div class="hd">
<h4>服务器版本修改</h4>
</div>
<div id="tableMenu">
<form action="${ctx}/dimIver/getDimIverList.do" method="get" id="queryForm" name="queryForm">
<div style="float:left;">
产品:
<select id="product" name="product">
<option value="null" <c:if test="${product=='null'}">selected </c:if>>全部</option>
<c:forEach items="${dimProducts}" var="item">
<option value="${item.product }" <c:if test="${item.product==product}">selected </c:if>>
${item.description }
</option>
</c:forEach>
</select>
版本号:
<select id="iver" name="iver">
<c:forEach items="${dimIvers}" var="item">
<option value="${item.iver }" <c:if test="${item.iver==iver}">selected </c:if>>
<c:choose>
<c:when test="${item.iver=='null'}">全部</c:when>
<c:when test="${item.iver=='other'}">其他</c:when>
<c:otherwise>${item.iver}</c:otherwise>
</c:choose>
</option>
</c:forEach>
</select>
状态:
<select id="status" name="status">
<option value="1" <c:if test="${status==1}">selected </c:if>>线上版本</option>
<option value="0" <c:if test="${status==0}">selected </c:if>>线下版本</option>
</select>
</div>
<div style="float:left;margin:10px 0 0 30px;">
<input class="btn3" type="submit" value="查询" />
</div>
</div>
</div>
<div id="datarea">
<table>
<tbody>
<tr>
<th style="width:20px;">
<input type="checkbox" name="all" onclick="javascript:allselect(this, this.form.dimIvers)" />
</th>
<th>产品名称</th>
<th>版本号</th>
<th>状态</th>
<th style="width:50px">
<button class="btn2" onClick="javascript:updateEvent()">批量设置</button>
</th>
<th style="width:50px">
<button class="btn2" onClick="javascript:resetEvent()">批量设置</button>
</th>
</tr>
<c:forEach items="${dimIverList}" var="item" varStatus="index">
<tr class="${index.count % 2 == 0 ? 'odd' : 'even' }">
<td>
<input type="checkbox" name="dimIvers" value="${item['product']},${item['iver']}"/>
</td>
<td>
${item['description']}
</td>
<td>
<c:choose>
<c:when test="${item.iver=='null'}">全部</c:when>
<c:when test="${item.iver=='other'}">其他</c:when>
<c:otherwise>${item.iver}</c:otherwise>
</c:choose>
</td>
<td >
<c:if test="${item['status']==1}">线上 </c:if>
<c:if test="${item['status']==0}">线下 </c:if>
</td>
<td class="undefined">
<a class="btn2" href="${ctx}/dimIver/batchUpdateIver.do?product=${item['product']}&iver=${item['iver']}&dimIvers=${item['product']},${item['iver']}&status=1">设为线上</a>
</td>
<td class="undefined">
<a class="btn2" href="${ctx}/dimIver/batchUpdateIver.do?product=${item['product']}&iver=${item['iver']}&dimIvers=${item['product']},${item['iver']}&status=0">设为线下</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</form>
<div class="grayr" id="pageList">
<c:forEach items="${pagelist }" var="cp">
<span class="<c:if test='${cp==pageNum}'>current</c:if>">
<a href="getDimIverList.do?product=${product }&iver=${iver}&status=${status}&pageNum=${cp }">${cp }</a>
</span>
</c:forEach>
</div>
<table class="none">
<tr>
<th>帮助信息</th>
</tr>
<tr>
<td>
<div class="help">
<p></p>
</div>
</td>
</tr>
</table>
</div>
<!--{overview-->
</div>
<!--{home-->
</duowan:override>
<%@ include file="base.jsp" %>
相关推荐
本文实例讲述了JS提交form表单。分享给大家供大家参考,具体如下: 一、javascript 页面加裁时自动提交表单: Form表单: <form method="post" id="myform" action="a.php"> <input type="submit" value=...
如下所示: form表单ID:postform 设置表单请求url document.postform.action = SaveReturnInfo...以上就是小编为大家带来的js 提交form表单和设置form表单请求路径的实现方法全部内容了,希望大家多多支持软件开发网~
//增加的函数 begin function queryFun(){ var type = $("#artType").val(); var hasInputed = "1";//表示输入了要搜索 的信息 if($("#query").val()=="选手姓名/编号"){ //表示没有输入要搜索的值 ...
C# post方式提交Form表单。 C# post方式提交Form表单,可以支持带参数传入,供大家学习参考。 C# post提交表单。
在form表单提交中,使用button来间接完成submit的提交更为灵活。下面是实现方法: 使用button按钮实现submit提交,需要在button标签中的使用onclick方法,然后在JavaScript中实现具体,代码如下: <head> ...
批量提交表单JS,本人收藏的一个JS,还可以哦
jquery.form.js (异步提交,页面无刷新提交FORM), 1.需要引用jquery 2.引用JS后, $("form").ajaxSubmit(function (responseResult) { //responseResult 为从后台返回信息});
利用FormData对象,我们可以通过JavaScript用一些键值对来模拟一系列表单控件,我们还可以使用XMLHttpRequest的send()方法来异步的提交这个”表单”.比起普通的ajax,使用FormData的最大优点就是我们可以异步上传一个二...
EXT异步提交FORM表单的使用和,以及EXT配合struts2,sprint2.5进行前台和后台的交互解释和运用.....
Ajax如何无刷新提交form里面的内容。
jquery.js + jquery-form.js + springMVC实现ajax提交form表单和上传图片,上传图片成功js可以获取图片保存相对路径。
使用AJAX提交Form表单实例演示
异步表单提交插件,MVC模式下,可以异步提交指定表单信息,虽然MVC自带有表单提交功能,但是那个是不能提交图片等文件信息的,但是这个JQ可以做到!
在一个jsp页面中,定义了一个用户登录界面(以form表单定义),但要达到检验输入的信息的合法性,就需要对输入的用户信息作判断,那么自然就需要取出其中的值。有的页面可以用action传参来得到form中输入的信息值,...
使用JQuery实现从JSON对象转换为form提交数据
将数据以POST形式和图片一起传送到服务器,批量的哦!
使用jQuery.form插件,实现完美的表单异步提交
form 不提交数据form 不提交数据