|
@@ -3,7 +3,7 @@
|
|
|
|
|
|
<head>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
- <title>预约体检</title>
|
|
|
+ <title>家人维护</title>
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
|
|
|
<link href="/h5/style/style.css" rel="stylesheet" />
|
|
|
<script src="/h5/js/jquery-2.1.1.min.js"></script>
|
|
@@ -30,7 +30,7 @@
|
|
|
</td>
|
|
|
<td>
|
|
|
<div class="box">
|
|
|
- <input name="idcard" type="text" id="idcard" placeholder="请输入证件ID" th:attr="value=${people.idcard}" />
|
|
|
+ <input name="idcard" type="text" id="idcard" placeholder="请输入证件ID" th:attr="value=${people.idcard}" onchange="autoSetBirth()"/>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -155,6 +155,15 @@
|
|
|
}
|
|
|
$("#form1").submit();
|
|
|
}
|
|
|
+
|
|
|
+ function autoSetBirth(){
|
|
|
+ var idcard = $("#idcard").val();
|
|
|
+ console.log(idcard.length);
|
|
|
+ if (idcard.length == 18){
|
|
|
+ var birth = idcard.substring(6, 14);
|
|
|
+ $("#birth").val(idcard.substring(6,10) + "-" + idcard.substring(10,12) + "-" + idcard.substring(12,14));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/* ]]> */
|
|
|
</script>
|