1.HTML添加信息页面
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加</title>
<style>
#div1{
width:1000px;
height:400px;
background-color:pink;
box-sizing:border-box;
padding-left:300px;
margin:0 auto;
}
<script src="../js/jquery-2.1.1.js"></script>
<script>
function initDept(){
var select = $("#keshi");
$.ajax({
url:"/hospital/GetAllDeptsServlet",
type:"get",
dataType:"json",
success:function(ary){
for(var i=0; i<ary.length; i++){
var option = $("<option class='op'></option>");
option.val(ary[i].deptno);
option.text(ary[i].dname);
select.