1. 程式人生 > >2016/6/21--網頁點選儲存按鈕將資料存到資料庫

2016/6/21--網頁點選儲存按鈕將資料存到資料庫

——今天實現的功能是前臺表單上的儲存按鈕,將資料存到資料庫中。

貼幾段關鍵的程式碼:

.jsp

<span style="font-size:14px;"><form action="${ctx}/db5q/saveAddChild.do"  method="post"  id="AddChildForm">
	<div  id="button">
			<input  type="button" value="修改"/>
			<input  type="button" value="列印" />
			<input  type="button" value="關閉" />
			<input  type="submit" value="儲存" />
			<input  type="button" value="提交" />
	</div>
				<!--表頭-->
	  
		<br />
		<h2 align="center">
				<strong>農村留守兒童基本情況登記表</strong>
		</h2>
		<div style="float:left;margin-left:5%;">填報單位:(蓋章)<input name="addChild.createName" id="createName" type="text" style="border:0"/> </div></span>

注:input name應與實體類名字對應。form是表單提交的方法。$是ajax特有方法,ctx是寫好的路徑,直接拿來引用即可。

Action

@Override
	public String save(){
		try {
			addChildService.save(addChild);

		}catch(Exception e){
			e.printStackTrace();
			jsonString = "{'success':false,'message':'"+e.getMessage()+",新增失敗'}";
		}
		return SUCCESS; 
    }
注:儲存方法save

DaoImpl

	@SuppressWarnings("deprecation")
	public String save(){
		Session session = this.getHibernateTemplate().getSessionFactory().getCurrentSession();
		session.connection(); 
		try {
			AddChild.save();
		    } catch (Exception e) {
			e.printStackTrace();
	<span style="white-space:pre">	</span>}
		return SUCCESS;
	}
注意的是:hibernate對映檔案中的欄位要與資料庫、js介面、action中的欄位一致。而且有一個約定俗成的,實體類首字母大寫。下次記得。

這次新建.hbm.xml檔案時又忘記了,貼一下流程。






有件好玩的事情,今天有個報錯could not find a getter for……in class……

我就是那1%==


<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="mytags.jsp" %>  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"  pageEncoding="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=8" >
		<script language="javascript" type="text/javascript" src="<%=basePath%>/js/jquery-1.3.2.min.js"></script>
		<script language="javascript" type="text/javascript" src="<%=basePath%>/js//jquery.form.js"></script>
		<script language="javascript" type="text/javascript" src="<%=basePath%>/My97DatePicker/WdatePicker.js"></script>
		<script language="javascript" type="text/javascript" src="<%=basePath%>/js/dics/StaticJsonUtil.js.jsp"></script>
		<script language="javascript" type="text/javascript" src="AddChild.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/adapter/ext/ext-base.gzjs"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ext-all.gzjs"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ext-lang-zh_CN.gzjs"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/Ext.ux.LovCombo.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/Toast.gzjs"></script>
		<title>農村留守兒童基本情況登記表</title>
<style>
.table1{
		align:center;
		BORDER-RIGHT:#000000 1px solid; /* 顯示右邊框為1px,如果不想顯示就為0px */   
		border-top:#000000 1px solid;/* 顯示上邊框為1px,如果不想顯示就為0px */   
		BORDER-LEFT: #000000 1px solid;/* 顯示左邊框為1px,如果不想顯示就為0px */   
		BORDER-BOTTOM:0px;/* 顯下右邊框為1px,如果不想顯示就為0px */   
		} 
.table2{
		BORDER-RIGHT:#000000 1px solid; /* 顯示右邊框為1px,如果不想顯示就為0px */   
		border-top:#000000 1px solid;/* 顯示上邊框為1px,如果不想顯示就為0px */   
		BORDER-LEFT: 0px;/* 顯示左邊框為1px,如果不想顯示就為0px */   
		BORDER-BOTTOM:0px;/* 顯下右邊框為1px,如果不想顯示就為0px */   
		} 
.table3{
		BORDER-RIGHT:#000000 1px solid; /* 顯示右邊框為1px,如果不想顯示就為0px */   
		border-top:#000000 1px solid;/* 顯示上邊框為1px,如果不想顯示就為0px */   
		BORDER-LEFT: 0px;/* 顯示左邊框為1px,如果不想顯示就為0px */   
		BORDER-BOTTOM:#000000 1px solid;/* 顯下右邊框為1px,如果不想顯示就為0px */   
		}
.td2{
		BORDER-RIGHT:0px; /* 顯示右邊框為1px,如果不想顯示就為0px */   
		border-top:#000000 1px solid; /* 顯示上邊框為1px,如果不想顯示就為0px */   
		BORDER-LEFT: #000000 1px solid;/* 顯示左邊框為1px,如果不想顯示就為0px */   
		BORDER-BOTTOM:0px;/* 顯下右邊框為1px,如果不想顯示就為0px */   
		}
.td1{
		BORDER-RIGHT:#000000 1px solid; /* 顯示右邊框為1px,如果不想顯示就為0px */     
		BORDER-LEFT: #000000 1px solid;
		border-top:0px;/* 顯示左邊框為1px,如果不想顯示就為0px */   
		BORDER-BOTTOM:0px; 
		table-layout: fixed;
		} 
.td3{
		BORDER-RIGHT:0px; /* 顯示右邊框為1px,如果不想顯示就為0px */     
		BORDER-LEFT: #000000 1px solid;
		border-top:0px;/* 顯示左邊框為1px,如果不想顯示就為0px */   
		BORDER-BOTTOM:0px; 
		table-layout: fixed;
		}
		
.t1{
		 text-align:center;
		 line-height:45px;
	 	 height:45px;
		}
table tr td{
		border:1px solid "#000000";
	 	text-align:center;
		height:27px;
		table-layout: fixed;
	 	}
	table{
		 border-collapse:collapse;
		 border:1px solid "#000000";
		 border-top-width:Opx;
		 
		}
	/* #globle{
	     width:1200px;
		 margin:0 auto;
		} */
	input [type="textfield"],[type="date"]{
	     outline:0;
		 border:0;
		}
	#button{
	     float:right;
	     margin-right:5%;
		}
	/*
	
.DivSelect
{
    float:left;
    position: relative;
    background-color: transparent;
 
    overflow: hidden; 
    border-width:0px;
    border-top-style: none; 
    border-right-style: none; 
    border-left-style: none; 
    border-bottom-style: none;
}

/
.SelectList
{
    position: relative;
    background-color: transparent;
    border-width: 0px;
    border-top-style: none; 
    border-right-style: none; 
    border-left-style: none; 
    border-bottom-style: none;
    display:table-row;
    overflow:hidden;
}*/
  </style>
  			
		<script type="text/javascript">		
			//身份證號碼的驗證
			function isCardNo(card){  
					   // 身份證號碼驗證 
					   var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;  
					   if(reg.test(card)){  
					 		return true;
					   }
					   else{
					   		
					       		return  false;  
					   }
			};
			//初始化頁面下拉框選項  
			function initData(){
				initPage();
			};
			$(function(){		
					
			$("#addChildForm").ajaxForm({
				beforeSubmit:function(){
						var createName = document.getElementById("createName").value;
						var name = document.getElementById("name").value;
						var birthday = document.getElementById("birthday").value;
						var idNumber = document.getElementById("idNumber").value;
						var accountAddress = document.getElementById("accountAddress").value;
						var address = document.getElementById("address").value;
						var schoolName = document.getElementById("schoolName").value;
						var schoolAddress = document.getElementById("schoolAddress").value;
						var sickenStyle = document.getElementById("sickenStyle").value;
						var fatherName = document.getElementById("fatherName").value;
						var motherName = document.getElementById("motherName").value;
						var fatherIdNumber = document.getElementById("fatherIdNumber").value;
						var motherIdNumber = document.getElementById("motherIdNumber").value;
						var fatherWorkAddress = document.getElementById("fatherWorkAddress").value;
						var motherWorkAddress = document.getElementById("motherWorkAddress").value;
						var grandFatherName = document.getElementById("grandFatherName").value;
						var grandMotherName = document.getElementById("grandMotherName").value;
						var outGrandFatherName = document.getElementById("outGrandFatherName").value;
						var outGrandMotherName = document.getElementById("outGrandMotherName").value;
						var grandFatherBirthday = document.getElementById("grandFatherBirthday").value;
						var grandMotherBirthday = document.getElementById("grandMotherBirthday").value;
						var outGrandFatherBirthday = document.getElementById("outGrandFatherBirthday").value;
						var outGrandMotherBirthday = document.getElementById("outGrandMotherBirthday").value;
						var custodyRalation = document.getElementById("custodyRalation").value;
						var custodyName = document.getElementById("custodyName").value;
						var custodyTelNumber = document.getElementById("custodyTelNumber").value;
						var custodyIdNumber = document.getElementById("custodyIdNumber").value;
						var custodyAddress = document.getElementById("custodyAddress").value;
						var villageManName = document.getElementById("villageManName").value;
						var villageManTelNumber = document.getElementById("villageManTelNumber").value;
						var villageManIdNumber = document.getElementById("villageManIdNumber").value;
						
						
							if(createName==""){
								alert("填報單位不能為空!");
								return false;
							}
							else if(name ==""){
								alert("姓名不能為空!");
								return false;
							} 
							else if(sex ==""){
								alert("性別不能為空!");
								return false;
							} 
							else if(nation ==""){
								alert("民族不能為空!");
								return false;
							} 
							else if(birthday ==""){
								alert("出生日期不能為空!");
								return false;
							}
							else if(idNumber ==""){
								alert("身份證號碼不能為空!");
								return false;
							} 
							else if(!isCardNo(idNumber)){
								alert("兒童身份證號碼格式輸入不正確");
								return false;
							}  
							else if(accountAddress ==""){
								alert("戶籍地址不能為空!");
								return false;
							} 
							else if(address ==""){
								alert("現居住地不能為空!");
								return false;
							} 
							else if(schoolName ==""){
								alert("就讀學校不能為空!");
								return false;
							} 
							else if(schoolAddress ==""){
								alert("學校地址不能為空!");
								return false;
							} 
							else if(healthGrade ==""){
								alert("身體情況不能為空!");
								return false;
							} 
							else if(disabilityStyle ==""){
								alert("殘疾型別不能為空!");
								return false;
							} 
							else if(disabilityGrade ==""){
								alert("殘疾等級不能為空!");
								return false;
							} 
							else if(sickenStyle ==""){
								alert("患病型別不能為空!");
								return false;
							} 
							else if(education ==""){
								alert("就學情況不能為空!");
								return false;
							} 
							else if(ifSleepInSchool ==""){
								alert("是否學校寄宿不能為空!");
								return false;
							}
							else if(fatherName ==""){
								alert("父親的姓名不能為空!");
								return false;
							} 
							else if(motherName ==""){
								alert("母親的姓名不能為空!");
								return false;
							} 
							else if(fatherIdNumber ==""){
								alert("父親的身份證號碼不能為空!");
								return false;
							}
							else if(!isCardNo(fatherIdNumber)){
								alert("父親身份證號碼格式輸入不正確");
								return false;
							}  
							else if(motherIdNumber ==""){
								alert("母親的身份證號碼不能為空!");
								return false;
							} 
							else if(!isCardNo(motherIdNumber)){
								
								return false;
							}  
							else if(fatherWorkAddress ==""){
								alert("父親的務工地點不能為空!");
								return false;
							} 
							else if(motherWorkAddress ==""){
								alert("母親的務工地點不能為空!");
								return false;
							} 
							else if(grandFatherName ==""){
								alert("祖父的姓名不能為空!");
								return false;
							} 
							else if(grandMotherName ==""){
								alert("祖母的不能為空!");
								return false;
							} 
							else if(outGrandFatherName ==""){
								alert("外祖父的姓名不能為空!");
								return false;
							} 
							else if(outGrandMotherName ==""){
								alert("外祖母的姓名不能為空!");
								return false;
							} 
							else if(grandFatherBirthday ==""){
								alert("祖父的出生日期不能為空!");
								return false;
							} 
							else if(grandMotherBirthday ==""){
								alert("祖母的出生日期不能為空!");
								return false;
							} 
							else if(outGrandFatherBirthday ==""){
								alert("外祖父的出生日期不能為空!");
								return false;
							} 
							else if(outGrandMotherBirthday ==""){
								alert("外祖母的出生日期不能為空!");
								return false;
							} 
							else if(custodyStyle ==""){
								alert("監護型別不能為空!");
								return false;
							} 
							else if(custodyCondition ==""){
								alert("監護情況不能為空!");
								return false;
							} 
							else if(fatherAndMotherOut ==""){
								alert("父母雙方同時外出選項不能為空!");
								return false;
							} 
							else if(fatherOrMotherOut ==""){
								alert("父母一方外出而另一方無監護能力選項不能為空!");
								return false;
							} 
							else if(noCustodyPower ==""){
								alert("無監護能力選項不能為空!");
								return false;
							} 
							else if(custodyRalation ==""){
								alert("與親朋好友監護人關係不能為空!");
								return false;
							} 
							else if(custodyName ==""){
								alert("親朋監護人姓名不能為空!");
								return false;
							} 
							else if(custodyTelNumber ==""){
								alert("親朋監護人電話不能為空!");
								return false;
							} 
							else if(custodyIdNumber ==""){
								alert("親朋監護人身份證號碼不能為空!");
								return false;
							} 
							else if(!isCardNo(custodyIdNumber)){
		
								return false;
							} 
							else if(custodyAddress ==""){
								alert("受委託監護人居住地地址不能為空!");
								return false;
							} 
							else if(villageManName ==""){
								alert("村(居)委會聯絡人姓名不能為空!");
								return false;
							} 
							else if(villageManTelNumber ==""){
								alert("村(居)委會聯絡人電話不能為空!");
								return false;
							} 
							else if(villageManIdNumber ==""){
								alert("村(居)委會聯絡人身份證號碼不能為空!");
								return false;
							} 
							else if(!isCardNo(custodyIdNumber)){
		
								return false;
							} 
							
							var createTime = document.getElementById("year").value;
							var month = document.getElementById("month").value;
							var day = document.getElementById("day").value;
							var createTime = createTime+month+day;
								alert(createTime);
					},
					success:function(data){
							if(data=="{success}"){
								alert("儲存成功...!");
							}else{
								alert("儲存失敗,請檢查資料是否合法...!");
							}
						}
					});
								
			});
			
		</script>
</head>
<body onLoad="initData();">

	
	<form action="${ctx}/db5q/saveAddChild.do"  method="post"  id="AddChildForm">

	<div  id="button">
			<input  type="button" value="修改"/>
			<input  type="button" value="列印" />
			<input  type="button" value="關閉" />
			<input  type="submit" value="儲存" />
			<input  type="button" value="提交" />
		</div>
				<!--表頭-->
	  
		<br />
		<h2 align="center">
				<strong>農村留守兒童基本情況登記表</strong>
		</h2>
		<div style="float:left;margin-left:5%;">填報單位:(蓋章)<input name="addChild.createName" id="createName" type="text" style="border:0"/> </div>
		<div style="float:right; margin-right:10%;">填報日期:
			 <input class="t1" name="addChild.createtime" id="year" style="width:40%; height:80%;border:0;" type="input" name="permitDate" inputtype="date" id="permitDate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'});" readonly/>
		</div>

<!--第一個table-->	
<table align="center" class= "table1" width="90%" cellspacing="0" cellpadding="0">
<!--家庭基本情況-->
	<td width="8%"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="left">家庭基本情況</td>
          </tr>
        </table>
    </td>
<!-- 第一行-->
<td width="92%">
	<table  width="100%" cellspacing="0" cellpadding="0">
		<tr >
			<td class="td1" width="15%">姓名</td> 
			<td class="td1" width="20%"><input class="t1" name="addChild.name" id="name" type="text" style="width:97%; height:100%;border:0;"/></td>
			
			<td class="td1" width="10%">性別</td> 
			<td class="td1" width="15%">
				<input name="addChild.sex" id="sex" type="checkbox" value="man"/>男
				<input name="addChild.sex" id="sex" type="checkbox" value="woman"/>女</td>
			<td class="td1" width="10%">民族</td>
			<td class="td3" width="22%">
				<input type="text" name="addChild.nation" id="nation" class="t1" style="width:99%; height:100%;border:0;"> </td>
		</tr>
		</table>
		<table width="100%" cellspacing="0" cellpadding="0">
			<!-- 第二行-->
				<tr>
					<td class="td2" width="15%">出生日期</td> 
					<td class="td2" width="20%"><input class="t1" name="addChild.birthday" id="birthday" style="width:99%; height:100%;border:0;" type="input" name="permitDate" inputtype="date" id="permitDate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'});" readonly/></td>
					<!--資料庫新增加-->
					<td class="td2" width="10%">是否登記戶口</td> 
					<td class="td2" width="15%">
						<input name="addChild.check" id="check" type="checkbox" value="yes"/>是
						<input name="addChild.check" id="check" type="checkbox" value="no"/>否</td>						
					<td class="td2" width="10%">公民身份號碼</td>
					<td class="td2" width="22%"><input type="text" name="addChild.idNumber" id="idNumber" class="t1" style="width:99%; height:100%;border:0;"></td>
				</tr>	
		</table>
		
		<table width="100%" cellspacing="0" cellpadding="0">
<!-- 第三行 待修改地址改成下拉列表-->
		<tr>
			<td class="td2" width="15%">戶籍所在地</td> 
			<td class="td2" width="77%">
				廣西壯族自治區<select name="addChild.city" id="city" style="width:10%;border:1px solid #000000">
					<option>ffgfg</option>
				</select>市
				<select  name="addChild.county" id="country" style="width:10%;border:0;border:1px solid #000000">
					<option>rgdfgfg</option>				
				</select>縣(市、區)
				<select name="addChild.village" id="village" style="width:10%;border:0;border:1px solid #000000">
					<option>2</option>	</select>鄉鎮(街道)
				<select name="addChild.community" id="community" style="width:10%; border:0;border:1px solid #000000;">
					<option>5</option></select>村(社群)
				</td>
		</tr>
		</table>
		
	<table  width="100%" cellspacing="0" cellpadding="0">
<!-- 第四行 待修改-->
		<tr>
			<td class="td2" width="15%">現居住地址</td>
			<td class="td2"width="77%">
					廣西壯族自治區<select name="addChild.city" id="city" style="width:10%;border:1px solid #000000">
					<option>ffgfg</option>
				</select>市
				<select  name="addChild.county" id="country" style="width:10%;border:0;border:1px solid #000000">
					<option>rgdfgfg</option>				
				</select>縣(市、區)
				<select name="addChild.village" id="village" style="width:10%;border:0;border:1px solid #000000">
					<option>2</option>	</select>鄉鎮(街道)
				<select name="addChild.community" id="community" style="width:10%; border:0;border:1px solid #000000;">
					<option>5</option></select>村(社群)
				</td>
		</tr>
	</table>
	
	<!-- 第五行改動-->
	<table  width="100%" cellspacing="0" cellpadding="0">
		<tr>
			<td class="td2" width="15%">身體情況</td>
			<td class="td2" width="30%">
				<input name="addChild.healthGrade" id="healthGrade" type="checkbox" value="healty"/>健康
				<input name="addChild.healthGrade" id="healthGrade" type="checkbox" value="disabled"/>殘疾
				<input name="addChild.healthGrade" id="healthGrade" type="checkbox" value="sick"/>患病
			</td>		
			<td class="td2" width="7%">殘疾類別及等級</td>
			<td class="td2" width="8%">
				<input class="t1" type="text" name="addChild.disabilityStyle" id="disabilityStyle" style="width:97%; height:100%;border:0;"></td>	
			<td class="td2" width="10%">患病型別</td>
			<td class="td2" width="7%"><input class="t1" type="text" name="addChild.sickenStyle" id="sickenStyle" style="width:95%; height:100%;border:0;"></td>
			<td class="td2" width="7%">是否學習寄宿</td>
			<td class="td2" width="8%">
				<input name="addChild.lodgingschool" id="lodgingschool" type="checkbox" value="yes"/>是
				<input name="addChild.lodgingschool" id="lodgingschool" type="checkbox" value="no"/>否
			</td>
		</tr>
	</table>
	
	<table  width="100%" cellspacing="0" cellpadding="0">
		<tr>
			<td class="td2" width="15%">就學情況</td>
			<td class="td2" width="77%">
				<input name="addChild.education" id="education" type="checkbox" value="null"/>未入學
				<input name="addChild.education" id="education" type="checkbox" value="kindergarten"/>幼兒園
				<input name="addChild.education" id="education" type="checkbox" value="primaryschool"/>小學
				<input name="addChild.education" id="education" type="checkbox" value="juniorschool"/>初中
				<input name="addChild.education" id="education" type="checkbox" value="highschool"/>高中
				<input name="addChild.education" id="education" type="checkbox" value="secondaryschool"/>中職
				<input name="addChild.education" id="education" type="checkbox" value="leaveschool"/>輟學
				<input name="addChild.education" id="education" type="checkbox" value="noshool"/>不在學
				</td>
		</tr>
	</table>
</td>	
</table>
<!--第二個table-->
 <table align="center" width="90%" class="table1"  cellspacing="0" cellpadding="0">
<!--家庭情況-->
  <td class="td2" width="8%" rowspan=7 >家庭情況</td>
  <!-- 第一行-->
 <td width="92%">
   <table width="100%"  cellspacing="0" cellpadding="0">
	  <tr>
		<td class="td1" width="15%">父親姓名</td>
		<td class="td1" width="10%"><input class="t1" name="addChild.fatherName" id="fatherName" type="text" style="width:98%; height:100%;border:0;"/></td>
		<td class="td1" width="10%">公民身份號碼</td>
		<td class="td1" width="17%"><input class="t1" name="addChild.fatherIdNumber" id="fatherIdNumber" type="text" style="width:98%; height:100%;border:0;"/>
		<td class="td1"width="8%">當前務工地點</td>
		<td class="td1" width="17%"><input class="t1" name="addChild.fatherWorkAddress" id="fatherWorkAddress" type="text" style="width:20%; height:100%;border:0;border-bottom:1px solid #000000"/>省<input class="t1" name="addChild.fatherWorkAddress" id="fatherWorkAddress" type="text" style="width:20%; height:100%;border:0;border-bottom:1px solid #000000"/>市</td>
		<td class="td1" width="7%">聯絡電話</td>
		<td class="td3" width="8%"><input class="t1" name="addChild.fatherPhoneNumber" id="fatherPhoneNumber" type="text" style="width:95%; height:80%;border:0;"/></td>	
	  </tr>
	 </table>
	  <!-- 第二行-->
	 <table width="100%"  cellspacing="0" cellpadding="0">
	  <tr>
		<td class="td2" width="15%">母親姓名</td>
		<td class="td2" width="10%"><input class="t1" name="addChild.motherName" id="motherName" type="text" style="width:98%; height:100%;border:0;"/></td>
		<td class="td2" width="10%">公民身份號碼</td>
		<td class="td2" width="17%"><input class="t1" name="addChild.motherIdNumber" id="motherIdNumber" type="text" style="width:98%; height:100%;border:0;"/>
		<td class="td2"width="8%">當前務工地點</td>
		<td class="td2" width="17%"><input class="t1" name="addChild.motherWorkAddress" id="motherWorkAddress" type="text" style="width:20%; height:100%;border:0;border-bottom:1px solid #000000"/>省<input class="t1" name="addChild.motherWorkAddress" id="motherWorkAddress" type="text" style="width:20%;height:90%;border:0;border-bottom:1px solid #000000"/>市</td>

		<td class="td2" width="7%">聯絡電話</td>
		<td class="td2" width="8%"><input class="t1" name="addChild.motherPhoneNumber" id="motherPhoneNumber" type="text" style="width:95%; height:80%;border:0;"/></td>	
	  </tr>
	 </table>
	  <!-- 第三行-->
	  <table width="100%"  cellspacing="0" cellpadding="0">
	  <tr>
		<td class="td2" width="15%">祖父姓名</td>
		<td class="td2" width="20%"><input class="t1" name="addChild.grandFatherName" id="grandFatherName" type="text" style="width:98%; height:90%;border:0;"/></td>
		<td class="td2" width="10%">出生日期</td>
		<td class="td2" width="7%"><input class="t1" style="width:80%; height:70%;border:0" type="input" name="addChild.grandFatherBirthday" inputtype="date" id="grandFatherBirthday" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'});" readonly /></td>
		<td class="td2"width="8%">祖母姓名</td>
		<td class="td2" width="17%"><input class="t1" name="addChild.grandMotherName" id="grandMotherName" type="text" style="width:90%; height:100%;border:0;"/></td>
		<td class="td2" width="7%">出生日期</td>
		<td class="td2" width="8%"><input class="t1" style="width:80%; height:70%;border:0" type="input" name="addChild.grandFatherBirthday" inputtype="date" id="grandFatherBirthday" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'});" readonly /></td>
	  </tr>
	 </table>
	  <!-- 第四行-->
	  <table width="100%"  cellspacing="0" cellpadding="0">
	  <tr>
		<td class="td2" width="15%">外祖父姓名</td>
		<td class="td2" width="20%"><input class="t1" name="addChild.outGrandFatherName" id="outGrandFatherName" type="text" style="width:98%; height:90%;border:0;"/></td>
		<td class="td2" width="10%">出生日期</td>
		<td class="td2" width="7%"><input class="t1" style="width:80%; height:70%;border:0" type="input" name="addChild.outGrandFatherBirthday" inputtype="date" id="outGrandFatherBirthday" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'});" readonly /></td>
		<td class="td2"width="8%">外祖母姓名</td>
		<td class="td2" width="17%"><input class="t1" name="addChild.grandMotherName" id="grandMotherName" type="text" style="width:90%; height:100%;border:0;"/></td>
		<td class="td2" width="7%">出生日期</td>
		<td class="td2" width="8%"><input class="t1" style="width:80%; height:70%;border:0" type="input" name="addChild.outGrandMotherBirthday" inputtype="date" id="outGrandMotherBirthday" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'});" readonly /></td>
	  </tr>
	 </table>	  
	</td>
</table>	  
	  
	  
	  
	

<!--第三個表-->
<table align="center" width="90%" class="table1"  cellspacing="0" cellpadding="0">
	<td class="td2" width="8%" rowspan=4>實際監護情況</td>
	<td width="92%">
		<table width="100%" cellspacing="0" cellpadding="0">
		<!-- 第一行-->
			<tr>
				<td class="td1" width="15%">監護型別</td>
				<td class="td3" width="77%">
					<input name="addChild.custodyStyle" id="custodyStyle" type="checkbox" value="noman"/>無人監護
					<input name="addChild.custodyStyle" id="custodyStyle" type="checkbox" value="relative"/>(外)祖父母監護
					<input name="addChild.custodyStyle" id="custodyStyle" type="checkbox" value="friends"/>親朋監護</td> 
			</tr> 
		</table> 
		<table width="100%" cellspacing="0" cellpadding="0">
			<!-- 第二行-->
			<tr>
				<td class="td2" width="15%">父母雙方同時外出</td> 
				<td class="td2" width="30%">
					<input name="addChild.fatherAndMotherOut" id="fatherAndMotherOut" type="checkbox" value="yes"/>是
					<input name="addChild.fatherAndMotherOut" id="fatherAndMotherOut" type="checkbox" value="no"/>否
				</td>
				<td class="td2" width="15%">父母一方外出而另一方無監護能力</td> 
				<td class="td2" width="17%">
					<input name="addChild.fatherOrMotherOut" id="fatherOrMotherOut" type="checkbox" value="yes"/>是
					<input name="addChild.fatherOrMotherOut" id="fatherOrMotherOut" type="checkbox" value="no"/>否</td>
				<td class="td2" width="7%">無監護能力</td> 
				<td class="td2" width="8%">
					<input name="addChild.noCustodyPower" id="noCustodyPower" type="checkbox" value="father"/>父親
					<input name="addChild.noCustodyPower" id="noCustodyPower" type="checkbox" value="mother"/>母親</td>
			</tr>
		</table>
	<!-- 第三行-->
	<table  width="100%" cellspacing="0" cellpadding="0">
		<tr>
			<td class="td2" width="15%">與親朋好友監護人關係</td> 
			<td class="td2" width="10%"><input class="t1" name="addChild.custodyRalation" id="custodyRalation" type="text" style="width:80%; height:90%;border:0;"></td>
			<td class="td2" width="10%">親朋監護人姓名</td> 
			<td class="td2" width="10%"><input class="t1" name="addChild.custodyName" id="custodyName" type="text" style="width:80%; height:90%;border:0;"></td>
			<td class="td2" width="7%">親朋監護人電話</td> 
		  	<td class="td2" width="8%"><input class="t1" name="addChild.custodyTelNumber" id="custodyTelNumber" type="text" style="width:94%; height:100%;border:0;"></td>
			<td class="td2" width="10%">親朋監護人公民身份號碼</td> 
		  	<td class="td2" width="22%"><input class="t1" name="addChild.custodyIdNumber" id="custodyIdNumber" type="text" style="width:94%; height:100%;border:0;"></td>
		</tr>
	</table>
	<table  width="100%" cellspacing="0" cellpadding="0">
	<!-- 第四行-->
		<tr>
			<td class="td2" width="25%">受委託監護人居住地地址</td>
			<td class="td2" width="67%"><input class="t1" name="addChild.custodyAddress" id="custodyAddress" type="text" style="width:99%; height:100%;border:0;"></td>
		</tr>
	</table>
	</td>
	</table>
	<!--第四個表-->
<table align="center" class="table1" width="90%" cellspacing="0" cellpadding="0">
	<tr>
			<td class="td2" width="8%">家庭經濟來源</td>
			<td class="td1" width="92%">
				<input type="checkbox" id="chenck1" name="addChild.familyMoneySource" value="1" > 打工收入  
				<input type="checkbox" name="addChild.familyMoneySource" value="2"> 種養殖業  
				<input type="checkbox" name="addChild.familyMoneySource" value="3"> 政府救助 
				<input type="checkbox" name="addChild.familyMoneySource" value="4"> 親朋接濟 
				<input type="checkbox" name="addChild.familyMoneySource" value="5"> 其他</br> 
				<span style="color:red;float:right">*注:以上選項可多選</span></td>
	</tr>
</table>

	<table align="center" class="table1" width="90%" cellspacing="0" cellpadding="0">
	<tr>
			<td class="td1" width="8%">救助幫扶情況</td>
			<td class="td3" width="92%">
				<input type="checkbox" name="addChild.helpCondition" value="1" checked="true"> 享受低保  
				<input type="checkbox" name="addChild.helpCondition" value="2"> 臨時救助  
				<input type="checkbox" name="addChild.helpCondition" value="3"> 醫療救助 
				<input type="checkbox" name="addChild.helpCondition" value="4"> 住房救助 
				<input type="checkbox" name="addChild.helpCondition" value="5"> 其他救助</br> 
				<span style="color:red;float:right">*注:以上選項可多選</span></td>
		 </tr>
	 </table>	
	<!--第五個表-->
	<table align="center" class="table3" width="90%" cellspacing="0" cellpadding="0">
	<tr >
		<td class="td2" width="23%">村(居)委會聯絡人姓名</td>
	  	<td class="td2" width="30%"><input class="t1" type="text" name="addChild.villageManName" id="villageManName" style="width:80%; height:90%;border:0;"></td>
		<td class="td2" width="15%">村(居)委會聯絡人電話</td>
		<td class="td2" width="32%"><input class="t1" type="text" name="addChild.villageManTelNumber" id="villageManTelNumber" style="width:80%; height:80%;border:0;"></td>	
	</tr>
	</table>
	<div style="float:left; margin-bottom:10px;margin-left:5%;">單位負責人(簽名):<input class="t1" type="text" style="width:20%; height:90%;border:0;"/> </div>
	<div style="float:left; margin-bottom:10px;margin-left:12%;">複核人(簽名):<input class="t1" type="text" style="width:20%; height:90%;border:0;"/></div>
	<div style="float:right; margin-bottom:10px;margin-right:5%;">填表人(簽名):<input class="t1" type="text" style="width:20%; height:90%;border:0;"/></div>
	<div style="float:left; margin-bottom:10px;margin-left:5%;">
			<p>注:1.農村留守兒童:因父母雙方連續外出務工3個月以上或一方連續外出務工3個月以上另一方無監護能力,無法與父母正常共同生活的不滿十六週歲農村戶籍未成年人。
			</br>       
	2.各年齡段農村留守兒童按照0-5週歲、6(含)-13週歲、14(含)-16週歲三個年齡階段劃分。不滿十六週歲農村劉碩兒童年齡計算時間截至2016年7月31日。
			</br>       
	3.選擇專案在“□”中劃“√”。祖父母、外祖父母去世或父母一方死亡的,在相應填報內容中劃“——”。
			</br>       
	4.患病:是指患有重特大疾病或嚴重精神障礙。
			</br>       	
	3.輟學:義務教育階段輟學的農村留守兒童;不在學:14歲至16歲未在學的農村留守兒童。
			</br>       
	6.監護情況評估:①較好:委託監護人較好履行監護職責,留守兒童在生活、教育、身心健康等方面得到較好保障;②一般:委託監護人能基本履行監護職責,留守兒童生活、教育、身心健康等方面得到基本保障,但未成年人有產生行為偏差、心理失當等情況的潛在危險。③差:無人監護、父母一方外出務工另一方無監護能力或委託監護人監護教育能力不足,留守兒童生活、教育、身心發展得不到有效保障,極易或已經出現行為偏差、心理失當、輟學、外出流浪乞討等非正常情況。
			</br>       
	7.父母外出務工地點填寫到XXX省(區、市)XXX市。
			</p>
</div>
	
	
</form>
</body>
</html>


我就是那1%==