今天遇到了一个form表单的问题

来源:互联网 发布:蚁群算法基本流程图 编辑:程序博客网 时间:2024/04/26 05:56
<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><%@ include file="/WEB-INF/manager/include.jsp"%><script type="text/javascript"> function doSave(){ var cityName = "";$("input[type='checkbox']:checked").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出  if($(this).val()!=null&&$(this).val()!=''){cityName += $(this).val()+";";}});$("#cityName").val("");$("#cityName").val(cityName);     msgConfirm('信息','推送地区维护吗?',function(b){ if(b==true){formSubmit("updateForm", null, null, '推送地区', true, msgAlert, ['推送地区', '修改推送地区成功!', 'info', function(){}],true);} }); }  function findCheck(){     var d = $("#headerListCheckbox").attr("checked");     if(d==true){if ($("#areaList").find(":checked").size() > 1) {}else {$("#headerListCheckbox").removeAttr("checked");}      }else if ($("#areaList").find(":checked").size() > 0) {$("#headerListCheckbox").attr("checked","true"); }else { $("#headerListCheckbox").attr("checked","false");} }     </script></head><body onload="tablecloth();"><div class="tools"><span class="date_btn"><i> <input type="button" value="刷新"onclick="self.parent.refreshCurrTab();" /> </i> </span></div><div id="scrollDiv" class="showScrollbarX"><table id="scrollTab" cellpadding="0" cellspacing="0" class="list"width="100%"><thead><th align="middle" ondblclick="tqlOrderBy('province');" colspan="5">请选择推送地区维护</th></tr></thead><tbody id="areaList"><form id="updateForm" name="updateForm" method="post"action="<%=request.getContextPath()%>/manager/pusharea/list.html"><input type="hidden" name="tradeId" value="adPushArea" /><!-- 用来存放所选城市名称的 --><input type="hidden" id="cityName" name="cityName" value="" /><c:forEach var="adPushMap" items="${ctx.out.provinceAdPushMap}" varStatus="ids"><tr><td colspan="5"><input type="checkbox" id="headerListCheckbox"name="listCheckbox${adPushMap.key}"onclick="checkAllBox(this.name,this.checked)"value=""/><t:areaName areaId="${adPushMap.key}" /></td></tr><tr><c:forEach var="cityMap" items="${adPushMap.value}" varStatus="idx"><c:if test="${idx.index != 0 && idx.index % 5 == 0}">  </tr>  <tr></c:if><c:if test="${cityMap.map.push_status=='0'}"><td><input type="checkbox" name="listCheckbox${adPushMap.key}"class="inst_id" onclick="findCheck()" id="inst_id"value="${cityMap.map.inst_id}" /><t:areaName areaId="${cityMap.map.city}" /></td></c:if><c:if test="${cityMap.map.push_status=='1'}"><td><input type="checkbox" name="listCheckbox${adPushMap.key}" checked="checked"onclick="findCheck()" id="inst_id"value="${cityMap.map.inst_id}" /><t:areaName areaId="${cityMap.map.city}" /></td></c:if></c:forEach></c:forEach></form></tbody></table></div><div class="buttonrow"><table width="100%" border="0" cellspacing="0" cellpadding="0"class="edit_frm_tb"><tbody><td><c:if test="${ctx.user.USER_INST_ID=='COUNTRY_OPER_INST'}"><input class="submitbtn" type="button" value="保存"onclick="doSave();" />  </c:if><input class="submitbtn" type="button" value="关闭"onClick="self.parent.closeCurrTab();" /></td></tbody></table></div></body></html>